forked from VimPlug/jedi
Catch 'OSError' instead of just 'PermissionError'
This commit is contained in:
@@ -369,7 +369,7 @@ def _is_potential_project(path):
|
|||||||
try:
|
try:
|
||||||
if path.joinpath(name).exists():
|
if path.joinpath(name).exists():
|
||||||
return True
|
return True
|
||||||
except PermissionError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ def _get_parent_dir_with_file(path: Path, filename):
|
|||||||
try:
|
try:
|
||||||
if parent.joinpath(filename).is_file():
|
if parent.joinpath(filename).is_file():
|
||||||
return parent
|
return parent
|
||||||
except PermissionError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user