Browse Source

Use six.reraise

pull/10/head
andrei 9 years ago
parent
commit
92958309a8
  1. 9
      disco/types/base.py

9
disco/types/base.py

@ -1,5 +1,4 @@
import six import six
import sys
import gevent import gevent
import inspect import inspect
import functools import functools
@ -64,13 +63,7 @@ class Field(object):
try: try:
return self.deserializer(raw, client) return self.deserializer(raw, client)
except Exception as e: except Exception as e:
err = ConversionError(self, raw, e) six.reraise(ConversionError, ConversionError(self, raw, e))
if six.PY2:
exc_info = sys.exc_info()
raise ConversionError, err, exc_info[2]
else:
raise err
@staticmethod @staticmethod
def type_to_deserializer(typ): def type_to_deserializer(typ):

Loading…
Cancel
Save