Skip to content

Commit

Permalink
PCAN: remove Windows registry check (#1672)
Browse files Browse the repository at this point in the history
Co-authored-by: zariiii9003 <[email protected]>
  • Loading branch information
zariiii9003 and zariiii9003 authored Oct 8, 2023
1 parent e3d912b commit b547dfc
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions can/interfaces/pcan/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
IS_WINDOWS = PLATFORM == "Windows"
IS_LINUX = PLATFORM == "Linux"

if IS_WINDOWS:
import winreg

logger = logging.getLogger("can.pcan")

# ///////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit b547dfc

Please sign in to comment.