Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2018-05-01 12:56:34 +0300
committerLipu Fei <lipu.fei815@gmail.com>2018-05-01 12:56:34 +0300
commit9a5fb47a6e5b63e4acea0e2f50620c65e6a4e66c (patch)
tree8668eb7b7c3041c772facfe5fa9a981e2038a5e4 /plugins/CuraProfileReader
parentcc207a3f9246a589d5db1be409b776730fbcd77c (diff)
parent0d8674eceb736290a5f980184e77adc097e47f13 (diff)
Merge master into material marketplace
Diffstat (limited to 'plugins/CuraProfileReader')
-rw-r--r--plugins/CuraProfileReader/CuraProfileReader.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py
index 12434d2c3f..d7370326e4 100644
--- a/plugins/CuraProfileReader/CuraProfileReader.py
+++ b/plugins/CuraProfileReader/CuraProfileReader.py
@@ -1,9 +1,10 @@
-# Copyright (c) 2016 Ultimaker B.V.
+# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser
from UM.PluginRegistry import PluginRegistry
from UM.Logger import Logger
+from UM.Settings.ContainerFormatError import ContainerFormatError
from UM.Settings.InstanceContainer import InstanceContainer # The new profile to make.
from cura.ReaderWriters.ProfileReader import ProfileReader
@@ -77,7 +78,10 @@ class CuraProfileReader(ProfileReader):
profile.addMetaDataEntry("type", "quality_changes")
try:
profile.deserialize(serialized)
- except Exception as e: # Parsing error. This is not a (valid) Cura profile then.
+ except ContainerFormatError as e:
+ Logger.log("e", "Error in the format of a container: %s", str(e))
+ return None
+ except Exception as e:
Logger.log("e", "Error while trying to parse profile: %s", str(e))
return None
return profile