Unverified Commit 9c63202a authored by Tim Dettmers's avatar Tim Dettmers Committed by GitHub
Browse files

Merge pull request #677 from osma/fix-robust-check-cuda-library

Robustness fix: don't break in case of directories without read permission
parents 2fd74f31 a51840fa
...@@ -215,8 +215,11 @@ def get_cuda_runtime_lib_paths(candidate_paths: Set[Path]) -> Set[Path]: ...@@ -215,8 +215,11 @@ def get_cuda_runtime_lib_paths(candidate_paths: Set[Path]) -> Set[Path]:
paths = set() paths = set()
for libname in CUDA_RUNTIME_LIBS: for libname in CUDA_RUNTIME_LIBS:
for path in candidate_paths: for path in candidate_paths:
if (path / libname).is_file(): try:
paths.add(path / libname) if (path / libname).is_file():
paths.add(path / libname)
except PermissionError:
pass
return paths return paths
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment