Skip to content

Commit

Permalink
Ignore IOError when checking Python file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tkf committed Nov 20, 2012
1 parent 03f4dd5 commit 4a34d98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jedi/dynamic.py
Expand Up @@ -33,7 +33,10 @@ def check_python_file(path):
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:
Expand Down

0 comments on commit 4a34d98

Please sign in to comment.