Ignore IOError when checking Python file
Emacs uses a symbolic link to non-existing file for locking file. It has the same extension as the original file. Therefore, Jedi must ignore IOError when trying to open this symbolic file.
This commit is contained in:
1 parent
03f4dd5516
commit
4a34d98967
1 file changed
+4
-1
+4
-1
@@ -33,7 +33,10 @@ def get_directory_modules_for_name(mods, name):
|
||||
try:
|
||||
return builtin.CachedModule.cache[path][1].module
|
||||
except KeyError:
|
||||
return check_fs(path)
|
||||
try:
|
||||
return check_fs(path)
|
||||
except IOError:
|
||||
return None
|
||||
|
||||
def check_fs(path):
|
||||
with open(path) as f:
|
||||
|
||||
Reference in new issue
Block a user