Exception.message => str(Exception)

This commit is contained in:
Gina Häußge committed 2015-03-26 12:04:05 +01:00
1 parent fb2719ce8a
commit 9b3daeea01
6 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -135,7 +135,7 @@ def printerToolCommand():
try:
printer.flow_rate(factor)
except ValueError as e:
return make_response("Invalid value for flow rate: %s" % e.message, 400)
return make_response("Invalid value for flow rate: %s" % str(e), 400)
return NO_CONTENT
@@ -273,7 +273,7 @@ def printerPrintheadCommand():
try:
printer.feed_rate(factor)
except ValueError as e:
return make_response("Invalid value for feed rate: %s" % e.message, 400)
return make_response("Invalid value for feed rate: %s" % str(e), 400)
return NO_CONTENT