fix a nested import problem with not found imports

This commit is contained in:
David Halter
2013-08-11 17:59:36 +04:30
parent 0fef34c26e
commit 710dac797b

View File

@@ -253,6 +253,7 @@ class ImportPath(pr.Base):
try:
importing = find_module(string)
except ImportError:
# TODO insert finally here
sys.path = temp
raise
sys.path = temp
@@ -287,6 +288,7 @@ class ImportPath(pr.Base):
current_namespace = follow_str(rel_path, '__init__')
if current_namespace[1]:
rest = self.import_path[i:]
break
else:
module_not_found()