mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Small performance improvement
This commit is contained in:
parent
904ade3e7c
commit
1267ef3902
@ -819,7 +819,7 @@ def get_usb_info(usbdev, debug=False): # {{{
|
||||
break
|
||||
else:
|
||||
return ans
|
||||
for devlist, devinfo, devpath in DeviceSet(guid=GUID_DEVINTERFACE_USB_DEVICE).interfaces(yield_devlist=True):
|
||||
for devlist, devinfo in DeviceSet(guid=GUID_DEVINTERFACE_USB_DEVICE).devices():
|
||||
if devinfo.DevInst == usbdev.devinst:
|
||||
device_port = get_device_registry_property(devlist, byref(devinfo), SPDRP_ADDRESS)[1]
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user