mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-02 10:13:22 +08:00
minor refactoring, use finally instead of complicated except
This commit is contained in:
@@ -262,11 +262,8 @@ class ImportPath(pr.Base):
|
||||
sys.path, temp = sys_path_mod, sys.path
|
||||
try:
|
||||
importing = find_module(string)
|
||||
except ImportError:
|
||||
# TODO insert finally here
|
||||
finally:
|
||||
sys.path = temp
|
||||
raise
|
||||
sys.path = temp
|
||||
|
||||
return importing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user