Commit 38674e6ef35bb7dfb7e6d71b7eff3aa775f36e12
1 parent
92583b55
Exists in
dev
Fix AD_PLC & plc_checker
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
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, |
10 | 10 | from src.core.pyros_django.devices.PLC import PLCController |
11 | 11 | from src.core.pyros_django.env_monitor.plc_checker import PlcChecker |
12 | 12 | from common.models import * |
13 | -from env_monitor.models import Sensors_data_last_value | |
13 | +from env_monitor.models import Sensors_data_last_value, Sensors_data | |
14 | 14 | from dashboard.config_pyros import ConfigPyros |
15 | 15 | |
16 | 16 | ... | ... |
src/core/pyros_django/env_monitor/plc_checker.py
... | ... | @@ -158,7 +158,7 @@ class PlcChecker(object): |
158 | 158 | _file.write(json.dumps(_struct)) |
159 | 159 | _file.close() |
160 | 160 | logger.info("Saved : plc_config.json") |
161 | - except Exception as : | |
161 | + except: | |
162 | 162 | logger.error("Not saved plc_config.json") |
163 | 163 | raise Exception(f"Could not save plc_config.json ; current dir is {os.getcwd()} ; plc_config_dir is {plc_config_dir}") |
164 | 164 | ... | ... |