forked from mrq/bitsandbytes-rocm
Catch OSError with specific error number
This commit is contained in:
parent
a58cc5a13c
commit
7d771d1d6d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user