summaryrefslogtreecommitdiff
path: root/raven/utils
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2016-03-25 22:21:42 +0100
committerArmin Ronacher <armin.ronacher@active-4.com>2016-03-25 22:21:42 +0100
commitda688c9a9d306d21f585cece911ff4aa1e3b86fc (patch)
tree16316d4115cfdd63074978f071fb711dc9f4f8ed /raven/utils
parented91eef804eb1453ca625270fe1b67e2b687b89b (diff)
downloadraven-da688c9a9d306d21f585cece911ff4aa1e3b86fc.tar.gz
Added a workaround for bad traceback objects5.11.2
Diffstat (limited to 'raven/utils')
-rw-r--r--raven/utils/stacks.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/raven/utils/stacks.py b/raven/utils/stacks.py
index 518af01..bcd3023 100644
--- a/raven/utils/stacks.py
+++ b/raven/utils/stacks.py
@@ -140,7 +140,9 @@ def iter_traceback_frames(tb):
frames that do not contain the ``__traceback_hide__``
local variable.
"""
- while tb:
+ # Some versions of celery have hacked traceback objects that might
+ # miss tb_frame.
+ while tb and hasattr(tb, 'tb_frame'):
# support for __traceback_hide__ which is used by a few libraries
# to hide internal frames.
f_locals = getattr(tb.tb_frame, 'f_locals', {})