RecursionDecorator now also works with Evaluator caches

This commit is contained in:
Dave Halter
2013-12-24 19:14:14 +01:00
parent 118ed2e0a3
commit 85a12e8866
4 changed files with 23 additions and 22 deletions
+2 -2
View File
@@ -187,7 +187,7 @@ class ImportPath(pr.Base):
"""
Returns the imported modules.
"""
if self._evaluator.follow_statement.push_stmt(self.import_stmt):
if self._evaluator.recursion_detector.push_stmt(self.import_stmt):
# check recursion
return []
@@ -229,7 +229,7 @@ class ImportPath(pr.Base):
scopes = [ImportPath.GlobalNamespace]
debug.dbg('after import', scopes)
self._evaluator.follow_statement.pop_stmt()
self._evaluator.recursion_detector.pop_stmt()
return scopes
def _is_relative_import(self):