From 710dac797b7681ab27029daf6a6983d392ac879d Mon Sep 17 00:00:00 2001 From: David Halter Date: Sun, 11 Aug 2013 17:59:36 +0430 Subject: [PATCH] fix a nested import problem with not found imports --- jedi/imports.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jedi/imports.py b/jedi/imports.py index 117bc856..e8bf2659 100644 --- a/jedi/imports.py +++ b/jedi/imports.py @@ -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()