File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,13 @@ def add(x, y):
63
63
from timeit import default_timer
64
64
from typing import Collection , Iterable
65
65
66
- from celery import signals # pylint: disable=no-name-in-module
67
66
from billiard .einfo import ExceptionInfo
67
+ from celery import signals # pylint: disable=no-name-in-module
68
68
69
69
try :
70
- from billiard .einfo import ExceptionWithTraceback # pylint: disable=no-name-in-module
70
+ from billiard .einfo import ( # pylint: disable=no-name-in-module
71
+ ExceptionWithTraceback ,
72
+ )
71
73
except ImportError :
72
74
ExceptionWithTraceback = None
73
75
@@ -279,10 +281,7 @@ def _trace_failure(*args, **kwargs):
279
281
if ex is not None :
280
282
# Unwrap the actual exception wrapped by billiard's
281
283
# `ExceptionInfo` and `ExceptionWithTraceback`.
282
- if (
283
- isinstance (ex , ExceptionInfo )
284
- and ex .exception is not None
285
- ):
284
+ if isinstance (ex , ExceptionInfo ) and ex .exception is not None :
286
285
ex = ex .exception
287
286
288
287
if (
You can’t perform that action at this time.
0 commit comments