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 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):

Loading…
Cancel
Save