mirror of
https://github.com/python/cpython.git
synced 2026-04-23 12:21:01 +00:00
Fix an incorrect check in compiler_try_except(). (GH-9810)
(cherry picked from commit 53ebf4b070)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
parent
1c2cb516e4
commit
72927d0d17
1 changed files with 2 additions and 1 deletions
|
|
@ -2670,8 +2670,9 @@ compiler_try_except(struct compiler *c, stmt_ty s)
|
|||
|
||||
cleanup_end = compiler_new_block(c);
|
||||
cleanup_body = compiler_new_block(c);
|
||||
if (!(cleanup_end || cleanup_body))
|
||||
if (cleanup_end == NULL || cleanup_body == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
compiler_nameop(c, handler->v.ExceptHandler.name, Store);
|
||||
ADDOP(c, POP_TOP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue