mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-05 06:55:11 +08:00
Add more explanations for HWID being None
This commit is contained in:
parent
2e32ac8465
commit
8714ff9edb
@ -117,7 +117,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin):
|
|||||||
for port in serial.tools.list_ports.comports():
|
for port in serial.tools.list_ports.comports():
|
||||||
if not isinstance(port, tuple):
|
if not isinstance(port, tuple):
|
||||||
port = (port.device, port.description, port.hwid)
|
port = (port.device, port.description, port.hwid)
|
||||||
if not port[2]: # HWID may be None if the port got disconnected while processing.
|
if not port[2]: # HWID may be None if the port got disconnected while processing, the device is not USB or the system doesn't report the type.
|
||||||
continue
|
continue
|
||||||
if only_list_usb and not port[2].startswith("USB"):
|
if only_list_usb and not port[2].startswith("USB"):
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user