summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian+git@GrayVines.com>2012-06-19 09:25:53 -0400
committerJulian Berman <Julian+git@GrayVines.com>2012-06-19 09:25:53 -0400
commit0b0d59b12f3641c74a3efb0973eca85b2eb57c07 (patch)
tree7961a1132fa81959ad0f242314361ee814ccc32a
parent69faf9185c2607dadc68ca96b57578cba2adcc94 (diff)
downloadjsonschema-0b0d59b12f3641c74a3efb0973eca85b2eb57c07.tar.gz
ErrorTree.__repr__
-rw-r--r--jsonschema.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/jsonschema.py b/jsonschema.py
index 1e26631..bb6102b 100644
--- a/jsonschema.py
+++ b/jsonschema.py
@@ -649,6 +649,9 @@ class ErrorTree(object):
child_errors = sum(len(tree) for _, tree in iteritems(self._contents))
return len(self.errors) + child_errors
+ def __repr__(self):
+ return "<%s (%s errors)>" % (self.__class__.__name__, len(self))
+
def _extras_msg(extras):
"""