From 92958309a832b124a8bf952460d66f37f3258cb7 Mon Sep 17 00:00:00 2001 From: andrei Date: Sun, 30 Oct 2016 22:01:49 -0700 Subject: [PATCH] Use six.reraise --- disco/types/base.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/disco/types/base.py b/disco/types/base.py index 0bce0c8..611672e 100644 --- a/disco/types/base.py +++ b/disco/types/base.py @@ -1,5 +1,4 @@ import six -import sys import gevent import inspect import functools @@ -64,13 +63,7 @@ class Field(object): try: return self.deserializer(raw, client) except Exception as e: - err = ConversionError(self, raw, e) - - if six.PY2: - exc_info = sys.exc_info() - raise ConversionError, err, exc_info[2] - else: - raise err + six.reraise(ConversionError, ConversionError(self, raw, e)) @staticmethod def type_to_deserializer(typ):