summaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-02-26 13:47:14 +1100
committerDamien George <damien.p.george@gmail.com>2019-02-26 23:52:10 +1100
commit12ce9f268909435b49f558d1d3c15ad7591d6fe8 (patch)
tree0e962e3d6d40eba1d34cdb7d6c88ea73ab1f6e02 /py/compile.c
parent823b31e5287ee96c96620dac81cfeafc889a69fd (diff)
py/compile: Fix handling of unwinding BaseException in async with.
All exceptions that unwind through the async-with must be caught and BaseException is the top-level class, which includes Exception and others. Fixes issue #4552.
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/compile.c b/py/compile.c
index 4aaa68e6c..e660e668c 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -1830,7 +1830,7 @@ STATIC void compile_async_with_stmt_helper(compiler_t *comp, int n, mp_parse_nod
// Detect if TOS an exception or not
EMIT(dup_top);
- EMIT_LOAD_GLOBAL(MP_QSTR_Exception);
+ EMIT_LOAD_GLOBAL(MP_QSTR_BaseException);
EMIT_ARG(binary_op, MP_BINARY_OP_EXCEPTION_MATCH);
EMIT_ARG(pop_jump_if, false, l_ret_unwind_jump); // if not an exception then we have case 3