summaryrefslogtreecommitdiff
path: root/bitsandbytes
diff options
context:
space:
mode:
authorTom Aarsen <Cubiegamedev@gmail.com>2022-09-15 11:13:12 +0200
committerTom Aarsen <Cubiegamedev@gmail.com>2022-09-15 11:13:12 +0200
commit7d771d1d6d4c3df83c1b82d4d5df2b4dc95c1759 (patch)
tree2d7a0ef167c5d325a058d6c8436fb3500badb1c2 /bitsandbytes
parenta58cc5a13c99251956b073a50e03aec41a3a2e3f (diff)
Catch OSError with specific error number
Diffstat (limited to 'bitsandbytes')
-rw-r--r--bitsandbytes/cuda_setup/paths.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitsandbytes/cuda_setup/paths.py b/bitsandbytes/cuda_setup/paths.py
index 231b053..ba3f97f 100644
--- a/bitsandbytes/cuda_setup/paths.py
+++ b/bitsandbytes/cuda_setup/paths.py
@@ -18,8 +18,9 @@ def remove_non_existent_dirs(candidate_paths: Set[Path]) -> Set[Path]:
try:
if path.exists():
existent_directories.add(path)
- except errno.ENAMETOOLONG:
- pass
+ except OSError as exc:
+ if exc.errno != errno.ENAMETOOLONG:
+ raise exc
non_existent_directories: Set[Path] = candidate_paths - existent_directories
if non_existent_directories: