Skip to content

Commit b775278

Browse files
authored
fix TypeError (hardbyte#1466)
1 parent e9252de commit b775278

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

can/interfaces/pcan/basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,8 @@ def __init__(self):
658658
#
659659
if platform.system() == "Windows":
660660
# Loads the API on Windows
661-
self.__m_dllBasic = windll.LoadLibrary(find_library("PCANBasic"))
661+
_dll_path = find_library("PCANBasic")
662+
self.__m_dllBasic = windll.LoadLibrary(_dll_path) if _dll_path else None
662663
aReg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
663664
try:
664665
aKey = winreg.OpenKey(aReg, r"SOFTWARE\PEAK-System\PEAK-Drivers")

0 commit comments

Comments
 (0)