forked from platformio/platformio-core
Fix error with non unicode chars in serial port description
This commit is contained in:
1 parent
3ce32e54b2
commit
d2f3b76132
3 files changed
+4
-2
No files matched your search
@@ -14,7 +14,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
VERSION = (2, 8, "0.dev3")
|
||||
VERSION = (2, 8, "0.dev4")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
||||
+2
-1
@@ -272,7 +272,8 @@ def get_serialports():
|
||||
from serial.tools.list_ports import comports
|
||||
except ImportError:
|
||||
raise exception.GetSerialPortsError(os.name)
|
||||
result = [{"port": p, "description": d, "hwid": h}
|
||||
result = [{"port": p, "description": unicode(d, errors='ignore'),
|
||||
"hwid": h}
|
||||
for p, d, h in comports() if p]
|
||||
# fix for PySerial
|
||||
if not result and system() == "Darwin":
|
||||
|
||||
Reference in new issue
Block a user