forked from platformio/platformio-core
Fix empty list with serial ports on Mac OS X // Resolve #294
This commit is contained in:
@@ -30,6 +30,8 @@ PlatformIO 2.0
|
|||||||
* Fixed project generator for CLion IDE under Windows OS with invalid path to
|
* Fixed project generator for CLion IDE under Windows OS with invalid path to
|
||||||
executable
|
executable
|
||||||
(`issue #326 <https://github.com/platformio/platformio/issues/326>`_)
|
(`issue #326 <https://github.com/platformio/platformio/issues/326>`_)
|
||||||
|
* Fixed empty list with serial ports on Mac OS X
|
||||||
|
(`issue #294 <https://github.com/platformio/platformio/issues/294>`_)
|
||||||
|
|
||||||
2.3.4 (2015-10-13)
|
2.3.4 (2015-10-13)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
VERSION = (2, 4, "0.dev3")
|
VERSION = (2, 4, "0.dev4")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@@ -247,8 +247,13 @@ def get_serialports():
|
|||||||
from serial.tools.list_ports import comports
|
from serial.tools.list_ports import comports
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise exception.GetSerialPortsError(os.name)
|
raise exception.GetSerialPortsError(os.name)
|
||||||
return [{"port": p, "description": d, "hwid": h}
|
result = [{"port": p, "description": d, "hwid": h}
|
||||||
for p, d, h in comports() if p]
|
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():
|
def get_logicaldisks():
|
||||||
|
Reference in New Issue
Block a user