[Python-checkins] Fix an incorrect check in compiler_try_except(). (GH-9810)
Serhiy Storchaka
webhook-mailer at python.org
Fri Oct 12 01:54:08 EDT 2018
https://github.com/python/cpython/commit/53ebf4b0709f431b7262aa5daccef7eafde7383e
commit: 53ebf4b0709f431b7262aa5daccef7eafde7383e
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2018-10-12T08:54:03+03:00
summary:
Fix an incorrect check in compiler_try_except(). (GH-9810)
files:
M Python/compile.c
diff --git a/Python/compile.c b/Python/compile.c
index 096b762f36bb..78b7baf3235f 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);
More information about the Python-checkins
mailing list