summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-10-12 05:54:03 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-10-12 05:54:03 (GMT)
commit53ebf4b0709f431b7262aa5daccef7eafde7383e (patch)
tree81d82e3b8582db451057c22d2bc50e7a6568d64a
parentfc439d20de32b0ebccca79a96e31f83b85ec4eaf (diff)
downloadcpython-53ebf4b0709f431b7262aa5daccef7eafde7383e.zip
cpython-53ebf4b0709f431b7262aa5daccef7eafde7383e.tar.gz
cpython-53ebf4b0709f431b7262aa5daccef7eafde7383e.tar.bz2
Fix an incorrect check in compiler_try_except(). (GH-9810)
-rw-r--r--Python/compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 096b762..78b7baf 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2738,8 +2738,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);