diff options
author | Julian Berman <Julian@GrayVines.com> | 2013-09-22 18:44:33 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2013-10-27 18:35:29 -0400 |
commit | 11b3220eac39292e88df04a8b8a5a142812496fe (patch) | |
tree | 9b5e36f9f5b1ab19188c96de23cacb87bfbe5186 | |
parent | 8199901c3b434366edb8b87d5b56c65ca624bcca (diff) | |
download | jsonschema-11b3220eac39292e88df04a8b8a5a142812496fe.tar.gz |
Use ._contents in create_from
-rw-r--r-- | jsonschema/exceptions.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 5c52f41..8df987d 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -89,17 +89,7 @@ class _Error(Exception): @classmethod def create_from(cls, other): - return cls( - message=other.message, - cause=other.cause, - context=other.context, - path=other.path, - schema_path=other.schema_path, - validator=other.validator, - validator_value=other.validator_value, - instance=other.instance, - schema=other.schema, - ) + return cls(**other._contents()) def _set(self, **kwargs): for k, v in iteritems(kwargs): |