fix IndexErrors which sometimes happened, related to inter-module param searching

This commit is contained in:
David Halter
2012-09-29 17:54:22 +02:00
parent 1ae2a36838
commit 99cd894a7b
2 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -422,7 +422,8 @@ class Flow(Scope):
else:
self.set_vars = set_vars
for s in self.set_vars:
s.parent().parent = weakref.ref(self)
s.parent().parent = lambda: self
s.parent = weakref.ref(self)
@property
def parent(self):
@@ -1601,6 +1602,7 @@ class PyFuzzyParser(object):
self.freshscope = True
while True:
try:
self.module.temp_used_names = []
token_type, tok = self.next()
#debug.dbg('main: tok=[%s] type=[%s] indent=[%s]'\
# % (tok, tokenize.tok_name[token_type], start_position[0]))