Drolla / WavePlus_Bridge

Airthings Wave Plus Bridge to Wifi/LAN and MQTT
MIT License
21 stars 9 forks source link

Default configuration handling does not work correctly #11

Closed Drolla closed 2 years ago

Drolla commented 2 years ago

If the Yaml configuration file does not contain one of the following keys, the application does not apply correctly the default values: period, data_retention, retries, retry_delay.

The application crash with the following error stack trace:

Traceback (most recent call last):
  File "<path>/WavePlus_Bridge/waveplus_bridge.py", line 694, in <module>
    config = ReadConfiguration()
  File "<path>/WavePlus_Bridge/waveplus_bridge.py", line 99, in __init__
    if config[key] is None:
KeyError: 'retries'
Drolla commented 2 years ago

... working on a solution ...

Drolla commented 2 years ago

Corrected the issue with commit https://github.com/Drolla/WavePlus_Bridge/commit/b72e9fd779fe96ddeb1596a9e7108c2adcb37c44 on June 18, 2022.