From fefa3a1005c3f7349fc8171d9fb199e57ee786ca Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Mon, 27 Apr 2020 14:17:13 +0300 Subject: [PATCH] # Minor fix in OrchestratorSettingsExample --- Orchestrator/Settings/SettingsOrchestratorExample.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Orchestrator/Settings/SettingsOrchestratorExample.py b/Orchestrator/Settings/SettingsOrchestratorExample.py index edc6392e..3eb37f8a 100644 --- a/Orchestrator/Settings/SettingsOrchestratorExample.py +++ b/Orchestrator/Settings/SettingsOrchestratorExample.py @@ -2,6 +2,11 @@ import psutil import datetime import logging import sys # stdout fro logging +# Init variables +gControlPanelPyFilePathList = [ # .py file path list for call SettingsUpdate + r"" +] + def RenderRobotR01(inGlobalConfiguration): #Subheader Variants lSubheaderRunTrueText="Состояние: Работает" @@ -321,7 +326,7 @@ def Settings(): #Lambda function to get files .py from settings folder except Settings.py lFileList = [f for f in os.listdir(lSettingsPath) if os.path.isfile(os.path.join(lSettingsPath, f)) and f.split(".")[-1] == "py" and os.path.join(lSettingsPath, f) != __file__] import importlib.util - for lModuleFilePathItem in lFileList: + for lModuleFilePathItem in lFileList + gControlPanelPyFilePathList: # UPD 2020 04 27 Add gControlPanelPyFilePathList to import py files from Robots lModuleName = lModuleFilePathItem[0:-3] lFileFullPath = os.path.join(lSettingsPath, lModuleFilePathItem) lTechSpecification = importlib.util.spec_from_file_location(lModuleName, lFileFullPath)