Skip to content

Commit 967d8be

Browse files
UnionSystemskeirf
authored andcommitted
Windows: Update list_port_windows.py to latest chinaheyu:pyserial
This fixes empty name fields in the Windows serial port list. Fixes #549 Refs pyserial/pyserial#725
1 parent 528742a commit 967d8be

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/greaseweazle/tools/list_ports_windows.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,10 @@ def iterate_comports(cache_usb_info=True):
13171317
continue
13181318
yielded_devices.append(port_device)
13191319

1320+
# Skip ports with empty names (Thanks keirf/greaseweazle#550).
1321+
if port_device.port_name is None:
1322+
continue
1323+
13201324
# Skip parallel ports.
13211325
if port_device.port_name.startswith('LPT'):
13221326
continue

0 commit comments

Comments
 (0)