Skip to content

Commit 31292c9

Browse files
committed
fix: access correct attribute for tracebackhide check
1 parent 57816b7 commit 31292c9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sentry_sdk/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,10 @@ def get_type_module(cls):
144144

145145
def iter_stacks(tb):
146146
while tb is not None:
147-
f_locals = getattr(tb, "f_locals", None)
148147
skip = False
149148
for flag_name in "__traceback_hide__", "__tracebackhide__":
150149
try:
151-
if f_locals[flag_name]:
150+
if tb.tb_frame.f_locals[flag_name]:
152151
skip = True
153152
except Exception:
154153
pass

0 commit comments

Comments
 (0)