tools/mpremote: Fix connect-list in case VID/PID are None.
Which can be the case on Windows and macOS for certain serial devices. Fixes issue #7636. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
8fcdb5490c
commit
1f48934312
@ -166,7 +166,12 @@ def do_connect(args):
|
||||
for p in sorted(serial.tools.list_ports.comports()):
|
||||
print(
|
||||
"{} {} {:04x}:{:04x} {} {}".format(
|
||||
p.device, p.serial_number, p.vid, p.pid, p.manufacturer, p.product
|
||||
p.device,
|
||||
p.serial_number,
|
||||
p.vid if isinstance(p.vid, int) else 0,
|
||||
p.pid if isinstance(p.pid, int) else 0,
|
||||
p.manufacturer,
|
||||
p.product,
|
||||
)
|
||||
)
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user