Catch 'OSError' instead of just 'PermissionError'

This commit is contained in:
Adrian Labbé
2020-12-06 15:25:46 -03:00
parent 83d4ec9e84
commit 12a2d10595
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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