summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2021-05-10 19:44:06 +0200
committerpks <pks@pks.rocks>2021-05-10 19:44:06 +0200
commit700cfbd8ca5b21203f6a3443106b959c63104261 (patch)
treeee81fa7a14a37de52a4e0e6c2b7210d985cd7621
parentaf7f6c9367ab7e05d3d47a907fa81265a4418375 (diff)
fix
-rwxr-xr-xweather-logger-receiver5
1 files changed, 2 insertions, 3 deletions
diff --git a/weather-logger-receiver b/weather-logger-receiver
index 209c961..5f7cd1b 100755
--- a/weather-logger-receiver
+++ b/weather-logger-receiver
@@ -46,8 +46,7 @@ def add_data_to_db(data, handle, db_connection):
db_connection.commit()
-def loop(config, serial_connection, db_connection, logger):
- known_devices = config["known_devices"][config["active_location"]]
+def loop(known_devices, serial_connection, db_connection, logger):
while True:
logger.info("(Re-)Starting receiver loop")
@@ -139,6 +138,6 @@ if __name__ == "__main__":
try:
loop(known_devices, serial_connection, db_connection, logger)
except Exception as e:
- logger.error(f"Exception: '{e}'")
+ logger.error(f"Exception: {e}")
finally:
shutdown(config, serial_connection, db_connection, logger)