diff --git a/test/bytecode_3.0/02_try_except_except.pyc b/test/bytecode_3.0/02_try_except_except.pyc index 2d655465..a56e0021 100644 Binary files a/test/bytecode_3.0/02_try_except_except.pyc and b/test/bytecode_3.0/02_try_except_except.pyc differ diff --git a/test/simple_source/bug30/02_try_except_except.py b/test/simple_source/bug30/02_try_except_except.py index 56c729a9..3bbc94e7 100644 --- a/test/simple_source/bug30/02_try_except_except.py +++ b/test/simple_source/bug30/02_try_except_except.py @@ -7,3 +7,13 @@ def start_new_thread(function, args, kwargs={}): pass except: args() + +# Adapted from 3.0.1 code.py +# Bug is again JUMP_FORWARD elimination compared +# to earlier and later Pythons. +def interact(): + while 1: + try: + more = 1 + except KeyboardInterrupt: + more = 0 diff --git a/uncompyle6/parsers/parse30.py b/uncompyle6/parsers/parse30.py index f5e07b95..470fbe3d 100644 --- a/uncompyle6/parsers/parse30.py +++ b/uncompyle6/parsers/parse30.py @@ -121,6 +121,9 @@ class Python30Parser(Python31Parser): gen_comp_body ::= expr YIELD_VALUE COME_FROM POP_TOP + except_handler ::= jmp_abs COME_FROM_EXCEPT except_stmts + COME_FROM POP_TOP END_FINALLY + ################################################################################ for_block ::= l_stmts_opt _come_froms POP_TOP JUMP_BACK