Catch 'OSError' instead of just 'PermissionError'
This commit is contained in:
1 parent
83d4ec9e84
commit
12a2d10595
2 files changed
+2
-2
No files matched your search
@@ -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