Add safe init CP when starts

dev-linux
Ivan Maslov 4 years ago
parent f711586d61
commit e6945b4a2a

@ -49,12 +49,18 @@ if __name__ == "__main__": # New init way - allow run as module -m PyOpenRPA.Orc
Orchestrator.UACSuperTokenUpdate(inGSettings=gSettings, inSuperTokenStr="1992-04-03-0643-ru-b4ff-openrpa52zzz") Orchestrator.UACSuperTokenUpdate(inGSettings=gSettings, inSuperTokenStr="1992-04-03-0643-ru-b4ff-openrpa52zzz")
## !!! For Relative import !!! CP Version Check ## !!! For Relative import !!! CP Version Check
sys.path.insert(0,os.path.abspath(os.path.join(r""))) try:
from ControlPanel import CP_VersionCheck sys.path.insert(0,os.path.abspath(os.path.join(r"")))
CP_VersionCheck.SettingsUpdate(inGSettings=gSettings) from ControlPanel import CP_VersionCheck
CP_VersionCheck.SettingsUpdate(inGSettings=gSettings)
except Exception as e:
gSettings["Logger"].exception(f"Exception when init CP. See below.")
from ControlPanel import CP_Test try:
CP_Test.SettingsUpdate(inGSettings=gSettings) from ControlPanel import CP_Test
CP_Test.SettingsUpdate(inGSettings=gSettings)
except Exception as e:
gSettings["Logger"].exception(f"Exception when init CP. See below.")
# Call the orchestrator def # Call the orchestrator def
Orchestrator.Orchestrator(inGSettings=gSettings) Orchestrator.Orchestrator(inGSettings=gSettings)

Loading…
Cancel
Save