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:
Miss Islington (bot) 2018-10-12 00:19:20 -07:00 committed by GitHub
parent 1c2cb516e4
commit 72927d0d17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);