Also scan for symlinks in comports

Fixes https://github.com/esphome/feature-requests/issues/56
This commit is contained in:
Otto Winter 2019-08-27 22:10:23 +02:00
parent ccf3da2a5a
commit 2822fa4a40
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E

View file

@ -24,7 +24,7 @@ def get_serial_ports():
# from https://github.com/pyserial/pyserial/blob/master/serial/tools/list_ports.py # from https://github.com/pyserial/pyserial/blob/master/serial/tools/list_ports.py
from serial.tools.list_ports import comports from serial.tools.list_ports import comports
result = [] result = []
for port, desc, info in comports(): for port, desc, info in comports(include_links=True):
if not port: if not port:
continue continue
if "VID:PID" in info: if "VID:PID" in info: