diff --git a/src/emonhub_auto_conf.py b/src/emonhub_auto_conf.py index 08b4dc0..5d70ce6 100644 --- a/src/emonhub_auto_conf.py +++ b/src/emonhub_auto_conf.py @@ -61,15 +61,17 @@ def __init__(self,settings): if self.enabled: self._log.debug("Automatic configuration of nodes enabled") - else: - self._log.debug("Automatic configuration of nodes disabled") - # Initialize attribute settings as a ConfigObj instance - try: - result = ConfigObj(filename, file_error=True) - self.available = self.prepare_available(result['available']) - except Exception as e: - raise EmonHubAutoConfError(e) + # Initialize attribute settings as a ConfigObj instance + try: + result = ConfigObj(filename, file_error=True) + self.available = self.prepare_available(result['available']) + except Exception as e: + raise EmonHubAutoConfError(e) + + else: + self._log.debug("Automatic configuration of nodes disabled") + self.available = None def prepare_available(self,nodes): for n in nodes: