diff --git a/src/core/pyros_django/env_monitor/plc_checker.py b/src/core/pyros_django/env_monitor/plc_checker.py index f599889..2cdf6ab 100644 --- a/src/core/pyros_django/env_monitor/plc_checker.py +++ b/src/core/pyros_django/env_monitor/plc_checker.py @@ -154,11 +154,11 @@ class PlcChecker(object): # When executing test, we're not in the monitoring folder if("pyros_django" == os.getcwd().split("/")[-1]): plc_config_dir = Path("./env_monitor/") - _file = open(plc_config_dir/"plc_config.json" , 'w') + _file = open(os.path.join(plc_config_dir,"plc_config.json") , 'w') _file.write(json.dumps(_struct)) _file.close() logger.info("Saved : plc_config.json") - except: + except Exception as : 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