Fix error handling when setting has a parse error

The code was an integer. It needs to be converted to a string in order to be added to other strings.

Contributes to issue CURA-2572.
Esse commit está contido em:
Ghostkeeper
2017-02-03 11:12:46 +01:00
commit d0a149cf26
+1 -1
Ver Arquivo
@@ -235,7 +235,7 @@ class Setting:
tree = ast.parse(code, "eval")
compiled = compile(code, self._key, "eval")
except (SyntaxError, TypeError) as e:
print("Parse error in function (" + code + ") for setting", self._key + ":", str(e))
print("Parse error in function (" + str(code) + ") for setting", self._key + ":", str(e))
except IllegalMethodError as e:
print("Use of illegal method", str(e), "in function (" + code + ") for setting", self._key)
except Exception as e: