Commit 24e3fe16 authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Fixed nasty bug in Node.clone discovered by aimlessly reading the code in a break...

parent d4d80930
...@@ -102,7 +102,7 @@ class Node(object): ...@@ -102,7 +102,7 @@ class Node(object):
for attrname in result.child_attrs: for attrname in result.child_attrs:
value = getattr(result, attrname) value = getattr(result, attrname)
if isinstance(value, list): if isinstance(value, list):
setattr(result, attrname, value) setattr(result, attrname, [x for x in value])
return result return result
...@@ -3307,6 +3307,7 @@ class TryExceptStatNode(StatNode): ...@@ -3307,6 +3307,7 @@ class TryExceptStatNode(StatNode):
self.gil_check(env) self.gil_check(env)
def analyse_expressions(self, env): def analyse_expressions(self, env):
self.body.analyse_expressions(env) self.body.analyse_expressions(env)
self.cleanup_list = env.free_temp_entries[:] self.cleanup_list = env.free_temp_entries[:]
for except_clause in self.except_clauses: for except_clause in self.except_clauses:
......
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