Minor fixes

dev-linux
Ivan Maslov 4 years ago
parent 8e7e7f171d
commit 33ed3ad95a

@ -325,7 +325,7 @@ def OrchestratorRestart(inGSettings=None):
os.execl(sys.executable, os.path.abspath(__file__), *sys.argv) os.execl(sys.executable, os.path.abspath(__file__), *sys.argv)
sys.exit(0) sys.exit(0)
def OrchestratorSessionSave(inGSettings=None): def OrchestratorSessionSave(inGSettings):
""" """
Orchestrator session save in file Orchestrator session save in file
_SessionLast_RDPList.json (encoding = "utf-8") _SessionLast_RDPList.json (encoding = "utf-8")
@ -353,7 +353,7 @@ def OrchestratorSessionSave(inGSettings=None):
if lL: lL.exception(f"Exception when dump data before restart the Orchestrator") if lL: lL.exception(f"Exception when dump data before restart the Orchestrator")
return True return True
def OrchestratorSessionRestore(inGSettings=None): def OrchestratorSessionRestore(inGSettings):
""" """
Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings Check _SessionLast_RDPList.json and _SessionLast_StorageDict.pickle in working directory. if exist - load into gsettings
# _SessionLast_StorageDict.pickle (binary) # _SessionLast_StorageDict.pickle (binary)
@ -370,7 +370,7 @@ def OrchestratorSessionRestore(inGSettings=None):
lSessionLastRDPList = json.loads(lFile.read()) lSessionLastRDPList = json.loads(lFile.read())
lFile.close() # Close the file lFile.close() # Close the file
os.remove("_SessionLast_RDPList.json") # remove the temp file os.remove("_SessionLast_RDPList.json") # remove the temp file
gSettingsDict["RobotRDPActive"]["RDPList"] = lSessionLastRDPList # Set the last session dict inGSettings["RobotRDPActive"]["RDPList"] = lSessionLastRDPList # Set the last session dict
if lL: lL.warning(f"RDP Session List was restored from previous Orchestrator session") if lL: lL.warning(f"RDP Session List was restored from previous Orchestrator session")
# _SessionLast_StorageDict.pickle (binary) # _SessionLast_StorageDict.pickle (binary)
if os.path.exists("_SessionLast_StorageDict.pickle"): if os.path.exists("_SessionLast_StorageDict.pickle"):

Loading…
Cancel
Save