Merge branch 'feature/pyserial-3.0' into develop

This commit is contained in:
Ivan Kravets
2015-11-06 16:58:50 +02:00

View File

@ -243,11 +243,9 @@ def exec_command(*args, **kwargs):
def get_serialports():
if os.name == "nt":
from serial.tools.list_ports_windows import comports
elif os.name == "posix":
from serial.tools.list_ports_posix import comports
else:
try:
from serial.tools.list_ports import comports
except ImportError:
raise exception.GetSerialPortsError(os.name)
return [{"port": p, "description": d, "hwid": h}
for p, d, h in comports() if p]