diff options
-rw-r--r-- | pyserial/CHANGES.txt | 4 | ||||
-rw-r--r-- | pyserial/serial/tools/list_ports_windows.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/pyserial/CHANGES.txt b/pyserial/CHANGES.txt index cda018b..143ac23 100644 --- a/pyserial/CHANGES.txt +++ b/pyserial/CHANGES.txt @@ -445,7 +445,7 @@ Version 2.7 2012-nn-nn Bugfixes: - [Bug 3540332] SerialException not returned -- [Bug pyserial:45] Error in socket_connection.py +- [Bug pyserial:145] Error in socket_connection.py Bugfixes (posix): @@ -458,5 +458,5 @@ Bugfixes (win32): - [Bug 3444941] ctypes.WinError() unicode error - [Bug 3550043] on Window in tools global name 'GetLastError' is not defined - [Bug pyserial:146] flush() does nothing in windows (despite docs) - +- [Bug pyserial:144] com0com ports ignored due to missing "friendly name" diff --git a/pyserial/serial/tools/list_ports_windows.py b/pyserial/serial/tools/list_ports_windows.py index a9e200c..c158dd5 100644 --- a/pyserial/serial/tools/list_ports_windows.py +++ b/pyserial/serial/tools/list_ports_windows.py @@ -186,9 +186,10 @@ def comports(): szFriendlyName = byte_buffer(250)
if not SetupDiGetDeviceRegistryProperty(g_hdi, ctypes.byref(devinfo), SPDRP_FRIENDLYNAME, None, ctypes.byref(szFriendlyName), ctypes.sizeof(szFriendlyName) - 1, None):
# Ignore ERROR_INSUFFICIENT_BUFFER
- if ctypes.GetLastError() != ERROR_INSUFFICIENT_BUFFER:
+ #~ if ctypes.GetLastError() != ERROR_INSUFFICIENT_BUFFER:
#~ raise IOError("failed to get details for %s (%s)" % (devinfo, szHardwareID.value))
- port_name = None
+ # ignore errors and still include the port in the list, friendly name will be same as port name
+ yield string(port_name_buffer), string(port_name_buffer), string(szHardwareID)
else:
# the real com port name has to read differently...
hkey = SetupDiOpenDevRegKey(g_hdi, ctypes.byref(devinfo), DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ)
|