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
try:
sys.path.insert(0,os.path.abspath(os.path.join(r""))) sys.path.insert(0,os.path.abspath(os.path.join(r"")))
from ControlPanel import CP_VersionCheck from ControlPanel import CP_VersionCheck
CP_VersionCheck.SettingsUpdate(inGSettings=gSettings) CP_VersionCheck.SettingsUpdate(inGSettings=gSettings)
except Exception as e:
gSettings["Logger"].exception(f"Exception when init CP. See below.")
try:
from ControlPanel import CP_Test from ControlPanel import CP_Test
CP_Test.SettingsUpdate(inGSettings=gSettings) 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