mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 18:44:27 +02:00
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
|
||||
executable
|
||||
(`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)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
VERSION = (2, 4, "0.dev3")
|
||||
VERSION = (2, 4, "0.dev4")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@@ -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():
|
||||
|
Reference in New Issue
Block a user