|
@ -126,7 +126,7 @@ class Session(object): |
|
|
logger.error(error) |
|
|
logger.error(error) |
|
|
|
|
|
|
|
|
if result and "version" in result and "origin" in result and result["origin"] == METADATA["url"]: |
|
|
if result and "version" in result and "origin" in result and result["origin"] == METADATA["url"]: |
|
|
if METADATA["version"] >= result["version"]: |
|
|
if METADATA["version"] >= result["version"]: #Achtung. This only works because Python can compare Strings this way! |
|
|
self.guiWasSavedAsNSMVisible = result["guiWasSavedAsNSMVisible"] |
|
|
self.guiWasSavedAsNSMVisible = result["guiWasSavedAsNSMVisible"] |
|
|
if "recordingEnabled" in result: #introduced in april 2020 |
|
|
if "recordingEnabled" in result: #introduced in april 2020 |
|
|
self.recordingEnabled = result["recordingEnabled"] |
|
|
self.recordingEnabled = result["recordingEnabled"] |
|
@ -135,10 +135,10 @@ class Session(object): |
|
|
logger.info("Loading file complete") |
|
|
logger.info("Loading file complete") |
|
|
return Data.instanceFromSerializedData(parentSession=self, serializedData=result) |
|
|
return Data.instanceFromSerializedData(parentSession=self, serializedData=result) |
|
|
else: |
|
|
else: |
|
|
logger.warning(f"""{absoluteJsonFilePath} was saved with {result["version"]} but we need {METADATA["version"]}""") |
|
|
logger.error(f"""{absoluteJsonFilePath} was saved with {result["version"]} but we need {METADATA["version"]}""") |
|
|
sysexit() |
|
|
sysexit() |
|
|
else: |
|
|
else: |
|
|
logger.warning(f"""Error. {absoluteJsonFilePath} not loaded. Not a sane {METADATA["name"]} file in json format""") |
|
|
logger.error(f"""Error. {absoluteJsonFilePath} not loaded. Not a sane {METADATA["name"]} file in json format""") |
|
|
sysexit() |
|
|
sysexit() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|