diff --git a/jedi/api/project.py b/jedi/api/project.py index 4ba6b7d0..8c438f26 100644 --- a/jedi/api/project.py +++ b/jedi/api/project.py @@ -369,7 +369,7 @@ def _is_potential_project(path): try: if path.joinpath(name).exists(): return True - except PermissionError: + except OSError: continue return False diff --git a/jedi/inference/sys_path.py b/jedi/inference/sys_path.py index 9dd588db..e701686f 100644 --- a/jedi/inference/sys_path.py +++ b/jedi/inference/sys_path.py @@ -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