Skip to content

Commit

Permalink
fix variable error and upgrade documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
henne49 committed May 26, 2024
1 parent 5e1f315 commit dcade33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ After that call the `install.sh script.
```bash
wget -O main.zip https://github.com/henne49/dbus-opendtu/archive/refs/heads/main.zip
unzip main.zip "dbus-opendtu-main/*" -d /data
mv /data/dbus-opendtu-main/config.ini /data/dbus-opendtu-main/config.template
rm /data/dbus-opendtu/current.log*
cp -R /data/dbus-opendtu-main/* /data/dbus-opendtu
mv /data/dbus-opendtu-main/config.ini /data/dbus-opendtu-main/config.template
mv /data/dbus-opendtu-main /data/dbus-opendtu
cp /data/dbus-opendtu/config.ini /data/dbus-opendtu/config.backup
chmod a+x /data/dbus-opendtu/install.sh
```
Expand Down
6 changes: 3 additions & 3 deletions dbus-opendtu.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ def main():
number_of_inverters = 0

try:
maxBytes = int(config["DEFAULT"]["MaxFileSize"]) *1024
max_file_size = int(config["DEFAULT"]["MaxFileSize"]) *1024
except Exception:
maxBytes = 100*1024
max_file_size = 100*1024

try:
number_of_templates = int(config["DEFAULT"]["NumberOfTemplates"])
except Exception:
number_of_templates = 0

log_rotate_handler = logging.handlers.RotatingFileHandler(
maxBytes,
maxBytes=max_file_size,
backupCount=1,
encoding=None,
delay=0,
Expand Down

0 comments on commit dcade33

Please sign in to comment.