# Minor fix in OrchestratorSettingsExample

dev-linux
Ivan Maslov 5 years ago
parent 2e62fe58e0
commit fefa3a1005

@ -2,6 +2,11 @@ import psutil
import datetime import datetime
import logging import logging
import sys # stdout fro logging import sys # stdout fro logging
# Init variables
gControlPanelPyFilePathList = [ # .py file path list for call SettingsUpdate
r""
]
def RenderRobotR01(inGlobalConfiguration): def RenderRobotR01(inGlobalConfiguration):
#Subheader Variants #Subheader Variants
lSubheaderRunTrueText="Состояние: <span style=\"color:green\">Работает</span>" lSubheaderRunTrueText="Состояние: <span style=\"color:green\">Работает</span>"
@ -321,7 +326,7 @@ def Settings():
#Lambda function to get files .py from settings folder except Settings.py #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__] 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 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] lModuleName = lModuleFilePathItem[0:-3]
lFileFullPath = os.path.join(lSettingsPath, lModuleFilePathItem) lFileFullPath = os.path.join(lSettingsPath, lModuleFilePathItem)
lTechSpecification = importlib.util.spec_from_file_location(lModuleName, lFileFullPath) lTechSpecification = importlib.util.spec_from_file_location(lModuleName, lFileFullPath)

Loading…
Cancel
Save