Skip to content

Commit beb64bc

Browse files
committed
put back the JUMP_FORWARDS and add UNSET_LOC to fix the trace
1 parent 46cf04a commit beb64bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/compile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3475,6 +3475,8 @@ compiler_try_except(struct compiler *c, stmt_ty s)
34753475
POP_EXCEPT_AND_RERAISE(c);
34763476
compiler_use_next_block(c, orelse);
34773477
VISIT_SEQ(c, stmt, s->v.Try.orelse);
3478+
UNSET_LOC(c);
3479+
ADDOP_JUMP(c, JUMP_FORWARD, end);
34783480
compiler_use_next_block(c, end);
34793481
return 1;
34803482
}
@@ -3701,6 +3703,8 @@ compiler_try_star_except(struct compiler *c, stmt_ty s)
37013703
POP_EXCEPT_AND_RERAISE(c);
37023704
compiler_use_next_block(c, orelse);
37033705
VISIT_SEQ(c, stmt, s->v.TryStar.orelse);
3706+
UNSET_LOC(c);
3707+
ADDOP_JUMP(c, JUMP_FORWARD, end);
37043708
compiler_use_next_block(c, end);
37053709
return 1;
37063710
}

0 commit comments

Comments
 (0)