Commit 67ee3735 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes deprecation

Showing with 2 additions and 4 deletions
+2 -4
......@@ -145,7 +145,7 @@ def setup_loggers(mqtt=True):
if mqtt:
mqtt_settings = MQTT_LOGGING_CONFIG.copy()
mqtt_data_logging_level = mqtt_settings.pop('data_logging_level', logging.INFO)
[mqtt_settings.pop(i) for i in ['client_id', 'exec_topic', 'data_topic', 'soh_topic', 'exec_logging_level',
[mqtt_settings.pop(i, None) for i in ['client_id', 'exec_topic', 'data_topic', 'soh_topic', 'exec_logging_level',
'soh_logging_level']]
mqtt_settings.update({'topic': MQTT_LOGGING_CONFIG['data_topic']})
try:
......
......@@ -154,10 +154,8 @@ class OhmPi(object):
' Use python/ipython to interact with OhmPi object...')
def __getattr__(self, name):
if hasattr(deprecated, name):
if not hasattr(self, name) and hasattr(deprecated, name):
return getattr(deprecated, name)
else:
return self.__getattr__(name)
@staticmethod
def append_and_save(filename: str, last_measurement: dict, cmd_id=None):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment