diff --git a/HISTORY.rst b/HISTORY.rst index 40b52b6e..b559f1a4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -30,6 +30,8 @@ PlatformIO 2.0 * Fixed project generator for CLion IDE under Windows OS with invalid path to executable (`issue #326 `_) +* Fixed empty list with serial ports on Mac OS X + (`issue #294 `_) 2.3.4 (2015-10-13) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index ebf084d0..e78f7e30 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (2, 4, "0.dev3") +VERSION = (2, 4, "0.dev4") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/util.py b/platformio/util.py index 63091fe3..154b4a98 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -247,8 +247,13 @@ def get_serialports(): 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] + result = [{"port": p, "description": d, "hwid": h} + for p, d, h in comports() if p] + # fix for PySerial + if not result and system() == "Darwin": + for p in glob("/dev/tty.*"): + result.append({"port": p, "description": "", "hwid": ""}) + return result def get_logicaldisks():