bpo-46344: Fix trace bug in else of try and try-star blocks (GH-30544)

This commit is contained in:
Irit Katriel 2022-01-13 12:34:38 +00:00 committed by GitHub
parent 443b308fee
commit 9c2ebb906d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 32 deletions

View file

@ -3475,7 +3475,6 @@ compiler_try_except(struct compiler *c, stmt_ty s)
POP_EXCEPT_AND_RERAISE(c);
compiler_use_next_block(c, orelse);
VISIT_SEQ(c, stmt, s->v.Try.orelse);
ADDOP_JUMP(c, JUMP_FORWARD, end);
compiler_use_next_block(c, end);
return 1;
}
@ -3702,7 +3701,6 @@ compiler_try_star_except(struct compiler *c, stmt_ty s)
POP_EXCEPT_AND_RERAISE(c);
compiler_use_next_block(c, orelse);
VISIT_SEQ(c, stmt, s->v.TryStar.orelse);
ADDOP_JUMP(c, JUMP_FORWARD, end);
compiler_use_next_block(c, end);
return 1;
}