Better error message on __setitem__ failure (#22)

repr helps distinguish between strings and integers
This commit is contained in:
Victor Costan 2016-06-25 11:06:43 -07:00 committed by Brian Waldon
parent 632a78601d
commit 4f839e8fdb
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class Model(dict):
try:
self.validate(mutation)
except exceptions.ValidationError as exc:
msg = ("Unable to set '%s' to '%s'. Reason: %s"
msg = ("Unable to set '%s' to %r. Reason: %s"
% (key, value, str(exc)))
raise exceptions.InvalidOperation(msg)