Skip to content

Commit 39499db

Browse files
committed
Fixes #164, ValidationError.__unicode__(): use 'is' operator instead of
'==' for unset-check Test-case now passes OK.
1 parent 456234a commit 39499db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jsonschema/exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def __str__(self):
4848
return unicode(self).encode("utf-8")
4949

5050
def __unicode__(self):
51-
if _unset in (
52-
self.validator, self.validator_value, self.instance, self.schema,
53-
):
51+
if any(m is _unset for m in (
52+
self.validator, self.validator_value, self.instance, self.schema
53+
)):
5454
return self.message
5555

5656
pschema = pprint.pformat(self.schema, width=72)

0 commit comments

Comments
 (0)