From: daid303 Date: Mon, 11 Feb 2013 12:27:02 +0000 (+0100) Subject: Do not crash if the ini is malformed. X-Git-Tag: 13.03~49 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=97b049d37f76758e96ad756850591c81e449c860;p=cura.git Do not crash if the ini is malformed. --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 76755226..3575f31c 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -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