From 2631c58961c2f5ec90be560a8f5152fe27339a90 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 10 Jun 2023 22:11:41 +0300 Subject: fix mqtt_node_util --- src/electricity_calc.py | 1 - src/home/config/config.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/electricity_calc.py b/src/electricity_calc.py index c3cb233..8ea5a1c 100755 --- a/src/electricity_calc.py +++ b/src/electricity_calc.py @@ -3,7 +3,6 @@ import logging import os import sys import inspect -import zoneinfo from home.config import config # do not remove this import! from datetime import datetime, timedelta diff --git a/src/home/config/config.py b/src/home/config/config.py index dc00d2e..7344386 100644 --- a/src/home/config/config.py +++ b/src/home/config/config.py @@ -256,7 +256,10 @@ class Config: no_config=False): global app_config - if not isinstance(name, str) and not isinstance(name, bool) and issubclass(name, AppConfigUnit) or name == AppConfigUnit: + if not no_config \ + and not isinstance(name, str) \ + and not isinstance(name, bool) \ + and issubclass(name, AppConfigUnit) or name == AppConfigUnit: self.app_name = name.NAME self.app_config = name() app_config = self.app_config -- cgit v1.2.3