diff --git a/platformio/util.py b/platformio/util.py index f9ba07f9..fa71848b 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -249,7 +249,8 @@ def get_serialports(): from serial.tools.list_ports_posix import comports else: raise exception.GetSerialPortsError(os.name) - return [{"port": p, "description": d, "hwid": h} for p, d, h in comports()] + return [{"port": p, "description": d, "hwid": h} + for p, d, h in comports() if p] def get_logicaldisks():