summaryrefslogtreecommitdiff
path: root/jsonschema/exceptions.py
diff options
context:
space:
mode:
authorankostis@host:STUW025 <ankostis@gmail.com>2014-05-05 20:23:53 +0200
committerankostis@host:STUW025 <ankostis@gmail.com>2014-05-05 20:23:53 +0200
commit39499db8ac6575575a17663d1c0b55d8f7df95a2 (patch)
tree6a50f8f67fe03ee6c59f75880370c98545c1fe1d /jsonschema/exceptions.py
parent456234a61f338b7cf7e528c5104d8f536fbc12dc (diff)
downloadjsonschema-39499db8ac6575575a17663d1c0b55d8f7df95a2.tar.gz
Fixes #164, ValidationError.__unicode__(): use 'is' operator instead of
'==' for unset-check Test-case now passes OK.
Diffstat (limited to 'jsonschema/exceptions.py')
-rw-r--r--jsonschema/exceptions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py
index ec9f521..c12d517 100644
--- a/jsonschema/exceptions.py
+++ b/jsonschema/exceptions.py
@@ -48,9 +48,9 @@ class _Error(Exception):
return unicode(self).encode("utf-8")
def __unicode__(self):
- if _unset in (
- self.validator, self.validator_value, self.instance, self.schema,
- ):
+ if any(m is _unset for m in (
+ self.validator, self.validator_value, self.instance, self.schema
+ )):
return self.message
pschema = pprint.pformat(self.schema, width=72)