mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Catch 'OSError' instead of just 'PermissionError'
This commit is contained in:
@@ -369,7 +369,7 @@ def _is_potential_project(path):
|
||||
try:
|
||||
if path.joinpath(name).exists():
|
||||
return True
|
||||
except PermissionError:
|
||||
except OSError:
|
||||
continue
|
||||
return False
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ def _get_parent_dir_with_file(path: Path, filename):
|
||||
try:
|
||||
if parent.joinpath(filename).is_file():
|
||||
return parent
|
||||
except PermissionError:
|
||||
except OSError:
|
||||
continue
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user