forked from VimPlug/jedi
Merge pull request #66 from tkf/no-ioerror
Ignore IOError when checking Python file
This commit is contained in:
+4
-1
@@ -33,7 +33,10 @@ def get_directory_modules_for_name(mods, name):
|
|||||||
try:
|
try:
|
||||||
return builtin.CachedModule.cache[path][1].module
|
return builtin.CachedModule.cache[path][1].module
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return check_fs(path)
|
try:
|
||||||
|
return check_fs(path)
|
||||||
|
except IOError:
|
||||||
|
return None
|
||||||
|
|
||||||
def check_fs(path):
|
def check_fs(path):
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user