Skip to content

Commit 2020850

Browse files
committed
compare frames instead of line numbers
1 parent cd90034 commit 2020850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def _walk_tb_with_full_positions(tb, _seen=None):
415415
if tb.tb_lineno != tb.tb_frame.f_lineno and _seen:
416416
for exc in reversed(_seen.values()):
417417
if (handler_tb := exc.__traceback__) is not tb:
418-
while handler_tb.tb_lineno != tb.tb_frame.f_lineno:
418+
while handler_tb.tb_frame != tb.tb_frame:
419419
if not (handler_tb := handler_tb.tb_next):
420420
break
421421
else:

0 commit comments

Comments
 (0)