File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -196,11 +196,13 @@ def remove_non_existent_dirs(candidate_paths: Set[Path]) -> Set[Path]:
196196 try :
197197 if path .exists ():
198198 existent_directories .add (path )
199+ except PermissionError as pex :
200+ # Handle the PermissionError first as it is a subtype of OSError
201+ # https://docs.python.org/3/library/exceptions.html#exception-hierarchy
202+ pass
199203 except OSError as exc :
200204 if exc .errno != errno .ENAMETOOLONG :
201205 raise exc
202- except PermissionError as pex :
203- pass
204206
205207 non_existent_directories : Set [Path ] = candidate_paths - existent_directories
206208 if non_existent_directories :
@@ -361,4 +363,4 @@ def evaluate_cuda_setup():
361363 "if not has_cublaslt (CC < 7.5), then we have to choose _nocublaslt.so"
362364 binary_name = f"libbitsandbytes_cuda{ cuda_version_string } _nocublaslt.so"
363365
364- return binary_name , cudart_path , cc , cuda_version_string
366+ return binary_name , cudart_path , cc , cuda_version_string
You can’t perform that action at this time.
0 commit comments