mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix error with non unicode chars in serial port description
This commit is contained in:
1
examples/wiring-blink/.gitignore
vendored
1
examples/wiring-blink/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
.pioenvs
|
||||
.clang_complete
|
||||
.gcc-flags.json
|
||||
|
@ -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"
|
||||
|
@ -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