summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Anderson <sontek@gmail.com>2013-10-17 20:27:27 -0700
committerJohn Anderson <sontek@gmail.com>2013-10-17 20:27:27 -0700
commita324c1fc19b6ae49da879f804c8e20b8a6d34db7 (patch)
tree7f2c036e2a45934afad5a24a3cad18cfd55b7348
parent9440940677ebda454dbff2c5ce4d5376a0dfdb9a (diff)
downloadjsonschema-a324c1fc19b6ae49da879f804c8e20b8a6d34db7.tar.gz
Use pretty formatting
-rw-r--r--jsonschema/exceptions.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py
index 30419ae..c6e5ad9 100644
--- a/jsonschema/exceptions.py
+++ b/jsonschema/exceptions.py
@@ -106,12 +106,14 @@ class UnknownType(Exception):
pinstance = pprint.pformat(self.instance, width=72)
return textwrap.dedent("""
Uknown Type: %s, in schema:
- %r
+ %s
On instance:
- %s
+ %s
""".rstrip()
- ) % (self.type, self.schema, self.instance)
+ ) % (self.type,
+ _utils.indent(pschema),
+ _utils.indent(pinstance))