mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-28 07:32: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
|
sys.path, temp = sys_path_mod, sys.path
|
||||||
try:
|
try:
|
||||||
importing = find_module(string)
|
importing = find_module(string)
|
||||||
except ImportError:
|
finally:
|
||||||
# TODO insert finally here
|
|
||||||
sys.path = temp
|
sys.path = temp
|
||||||
raise
|
|
||||||
sys.path = temp
|
|
||||||
|
|
||||||
return importing
|
return importing
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user