Skip to content

Commit b547dfc

Browse files
authored
PCAN: remove Windows registry check (#1672)
Co-authored-by: zariiii9003 <[email protected]>
1 parent e3d912b commit b547dfc

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

can/interfaces/pcan/basic.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
IS_WINDOWS = PLATFORM == "Windows"
2525
IS_LINUX = PLATFORM == "Linux"
2626

27-
if IS_WINDOWS:
28-
import winreg
29-
3027
logger = logging.getLogger("can.pcan")
3128

3229
# ///////////////////////////////////////////////////////////
@@ -668,14 +665,6 @@ class PCANBasic:
668665
def __init__(self):
669666
if platform.system() == "Windows":
670667
load_library_func = windll.LoadLibrary
671-
672-
# look for Peak drivers in Windows registry
673-
with winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) as reg:
674-
try:
675-
with winreg.OpenKey(reg, r"SOFTWARE\PEAK-System\PEAK-Drivers"):
676-
pass
677-
except OSError:
678-
raise OSError("The PEAK-driver could not be found!") from None
679668
else:
680669
load_library_func = cdll.LoadLibrary
681670

0 commit comments

Comments
 (0)