Commit f767831f authored by Stefan Behnel's avatar Stefan Behnel

fixed utility code integration for try-except

parent b970aadc
......@@ -3527,7 +3527,6 @@ class TryExceptStatNode(StatNode):
if self.else_clause:
self.else_clause.analyse_control_flow(env)
env.finish_branching(self.end_pos())
env.use_utility_code(reset_exception_utility_code)
def analyse_declarations(self, env):
self.body.analyse_declarations(env)
......@@ -3536,6 +3535,7 @@ class TryExceptStatNode(StatNode):
if self.else_clause:
self.else_clause.analyse_declarations(env)
self.gil_check(env)
env.use_utility_code(reset_exception_utility_code)
def analyse_expressions(self, env):
self.body.analyse_expressions(env)
......
__doc__ = u"""
>>> a
2
"""
a = 0
try:
raise KeyError
except AttributeError:
a = 1
except KeyError:
a = 2
except:
a = 3
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment