From 38674e6ef35bb7dfb7e6d71b7eff3aa775f36e12 Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Fri, 13 Oct 2023 09:53:28 +0200 Subject: [PATCH] Fix AD_PLC & plc_checker --- src/core/pyros_django/env_monitor/AD_PLC.py | 2 +- src/core/pyros_django/env_monitor/plc_checker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/pyros_django/env_monitor/AD_PLC.py b/src/core/pyros_django/env_monitor/AD_PLC.py index ec798d0..ce72bda 100644 --- a/src/core/pyros_django/env_monitor/AD_PLC.py +++ b/src/core/pyros_django/env_monitor/AD_PLC.py @@ -10,7 +10,7 @@ from src.core.pyros_django.majordome.agent.Agent import Agent, build_agent, log, from src.core.pyros_django.devices.PLC import PLCController from src.core.pyros_django.env_monitor.plc_checker import PlcChecker from common.models import * -from env_monitor.models import Sensors_data_last_value +from env_monitor.models import Sensors_data_last_value, Sensors_data from dashboard.config_pyros import ConfigPyros diff --git a/src/core/pyros_django/env_monitor/plc_checker.py b/src/core/pyros_django/env_monitor/plc_checker.py index 2cdf6ab..81a1f08 100644 --- a/src/core/pyros_django/env_monitor/plc_checker.py +++ b/src/core/pyros_django/env_monitor/plc_checker.py @@ -158,7 +158,7 @@ class PlcChecker(object): _file.write(json.dumps(_struct)) _file.close() logger.info("Saved : plc_config.json") - except Exception as : + except: logger.error("Not saved plc_config.json") raise Exception(f"Could not save plc_config.json ; current dir is {os.getcwd()} ; plc_config_dir is {plc_config_dir}") -- libgit2 0.21.2