Skip to content

Commit 92e7b42

Browse files
committed
Simplify code (also for self-consistency)
1 parent b32ed13 commit 92e7b42

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cuda_bindings/cuda/bindings/_path_finder/load_dl_windows.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,7 @@ def load_with_system_search(libname: str, _unused: str) -> Optional[LoadedDL]:
115115
"""
116116
from cuda.bindings._path_finder.supported_libs import SUPPORTED_WINDOWS_DLLS
117117

118-
dll_names = SUPPORTED_WINDOWS_DLLS.get(libname)
119-
if dll_names is None:
120-
return None
121-
122-
for dll_name in dll_names:
118+
for dll_name in SUPPORTED_WINDOWS_DLLS.get(libname, ()):
123119
handle = ctypes.windll.kernel32.LoadLibraryW(ctypes.c_wchar_p(dll_name))
124120
if handle:
125121
return LoadedDL(handle, abs_path_for_dynamic_library(handle), False)

0 commit comments

Comments
 (0)