From 5e28f2b615758b0bbdefd5d314d76a5822b50148 Mon Sep 17 00:00:00 2001 From: zariiii9003 Date: Mon, 9 Oct 2023 00:12:45 +0200 Subject: [PATCH] remove Windows registry check --- can/interfaces/pcan/basic.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/can/interfaces/pcan/basic.py b/can/interfaces/pcan/basic.py index a57340955..e003e83f9 100644 --- a/can/interfaces/pcan/basic.py +++ b/can/interfaces/pcan/basic.py @@ -24,9 +24,6 @@ IS_WINDOWS = PLATFORM == "Windows" IS_LINUX = PLATFORM == "Linux" -if IS_WINDOWS: - import winreg - logger = logging.getLogger("can.pcan") # /////////////////////////////////////////////////////////// @@ -668,14 +665,6 @@ class PCANBasic: def __init__(self): if platform.system() == "Windows": load_library_func = windll.LoadLibrary - - # look for Peak drivers in Windows registry - with winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) as reg: - try: - with winreg.OpenKey(reg, r"SOFTWARE\PEAK-System\PEAK-Drivers"): - pass - except OSError: - raise OSError("The PEAK-driver could not be found!") from None else: load_library_func = cdll.LoadLibrary