chiark / gitweb /
Do not crash if the ini is malformed.
authordaid303 <daid303@gmail.com>
Mon, 11 Feb 2013 12:27:02 +0000 (13:27 +0100)
committerdaid303 <daid303@gmail.com>
Mon, 11 Feb 2013 12:27:02 +0000 (13:27 +0100)
Cura/util/profile.py

index 767552267a56c27a1f1b353918c8bca6e6fb246a..3575f31c6be40a50e7c2d7103c72c2fe63f91ef2 100644 (file)
@@ -432,7 +432,11 @@ def getMachineCenterCoords():
        return [getPreferenceFloat('machine_width') / 2, getPreferenceFloat('machine_depth') / 2]
 
 def getObjectMatrix():
-       return map(float, getProfileSetting('model_matrix').split(','))
+       try:
+               return map(float, getProfileSetting('model_matrix').split(','))
+       except ValueError:
+               return [1,0,0, 0,1,0, 0,0,1]
+
 
 #########################################################
 ## Alteration file functions