Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cpm_kernels/library/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
def lookup_dll(prefix):
paths = os.environ.get("PATH", "").split(os.pathsep)
for path in paths:
if not os.path.exists(path):
# if not dir, then ignore. or os.listdir(path) will raise error.
if not os.path.exists(path) or not os.path.isdir(path):
continue
for name in os.listdir(path):
if name.startswith(prefix) and name.lower().endswith(".dll"):
Expand Down