mirror of
https://github.com/thearn/Python-Arduino-Command-API.git
synced 2026-01-11 07:28:02 -05:00
Updated import of winreg
This commit is contained in:
@@ -8,7 +8,7 @@ from serial.tools import list_ports
|
||||
|
||||
import sys
|
||||
if sys.platform.startswith('win'):
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
else:
|
||||
import glob
|
||||
|
||||
@@ -24,7 +24,7 @@ def enumerate_serial_ports():
|
||||
path = 'HARDWARE\\DEVICEMAP\\SERIALCOMM'
|
||||
try:
|
||||
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, path)
|
||||
except OSError: # TODO
|
||||
except OSError:
|
||||
raise Exception
|
||||
|
||||
for i in itertools.count():
|
||||
|
||||
Reference in New Issue
Block a user