diff --git a/tools/mpremote/mpremote/main.py b/tools/mpremote/mpremote/main.py index d225bf2e41..6a6cbea573 100644 --- a/tools/mpremote/mpremote/main.py +++ b/tools/mpremote/mpremote/main.py @@ -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