MCPcopy Create free account
hub / github.com/celery/celery / from_exception

Method from_exception

celery/utils/serialization.py:149–158  ·  view source on GitHub ↗
(cls, exc)

Source from the content-addressed store, hash-verified

147
148 @classmethod
149 def from_exception(cls, exc):
150 res = cls(
151 exc.__class__.__module__,
152 exc.__class__.__name__,
153 getattr(exc, 'args', []),
154 safe_repr(exc)
155 )
156 if hasattr(exc, "__traceback__"):
157 res = res.with_traceback(exc.__traceback__)
158 return res
159
160
161def get_pickleable_exception(exc):

Callers 1

get_pickleable_exceptionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected