Skip to content

Commit 39f8f36

Browse files
authored
fix: check directory before listdir (haosulab#177)
1 parent c877626 commit 39f8f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/py_package/_vulkan_tricks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _ensure_egl_icd():
5353

5454
# 10_nvidia.json is installed
5555
for d in ["/usr/share/glvnd/egl_vendor.d", "/etc/glvnd/egl_vendor.d"]:
56-
if any(("nvidia" in f) for f in os.listdir(d)):
56+
if os.path.isdir(d) and any(("nvidia" in f) for f in os.listdir(d)):
5757
return
5858

5959
warn(

0 commit comments

Comments
 (0)