We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e8a42e4 + b4bc336 commit 6ba3e62Copy full SHA for 6ba3e62
bitsandbytes/cuda_setup/main.py
@@ -197,11 +197,13 @@ def remove_non_existent_dirs(candidate_paths: Set[Path]) -> Set[Path]:
197
try:
198
if path.exists():
199
existent_directories.add(path)
200
+ except PermissionError as pex:
201
+ # Handle the PermissionError first as it is a subtype of OSError
202
+ # https://docs.python.org/3/library/exceptions.html#exception-hierarchy
203
+ pass
204
except OSError as exc:
205
if exc.errno != errno.ENAMETOOLONG:
206
raise exc
- except PermissionError as pex:
- pass
207
208
non_existent_directories: Set[Path] = candidate_paths - existent_directories
209
if non_existent_directories:
0 commit comments