Skip to content

Commit b418245

Browse files
authored
fix winreg bug in pcan (#802)
only import winreg when on Windows
1 parent b8ca212 commit b418245

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

can/interfaces/pcan/basic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
from string import *
1515
import platform
1616
import logging
17-
import winreg
17+
18+
if platform.system() == "Windows":
19+
import winreg
1820

1921

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

0 commit comments

Comments
 (0)