|
@@ -167,8 +167,10 @@ class BaseBackend(object):
|
|
|
"""Convert serialized exception to Python exception."""
|
|
|
if self.serializer in EXCEPTION_ABLE_CODECS:
|
|
|
return get_pickled_exception(exc)
|
|
|
- return create_exception_cls(
|
|
|
- from_utf8(exc['exc_type']), __name__)(exc['exc_message'])
|
|
|
+ elif not isinstance(exc, BaseException):
|
|
|
+ return create_exception_cls(
|
|
|
+ from_utf8(exc['exc_type']), __name__)(exc['exc_message'])
|
|
|
+ return exc
|
|
|
|
|
|
def prepare_value(self, result):
|
|
|
"""Prepare value for storage."""
|