Added error state for container state if serialization data is none

CURA-2359
This commit is contained in:
Jaime van Kessel 2016-09-13 14:54:17 +02:00
parent db512d3b05
commit d6e95d2734

View file

@ -349,6 +349,9 @@ class ContainerManager(QObject):
except NotImplementedError:
return { "status": "error", "message": "Unable to serialize container"}
if contents is None:
return {"status": "error", "message": "Serialization returned None. Unable to write to file"}
with UM.SaveFile(file_url, "w") as f:
f.write(contents)