From f8e19f07ea435f4c9a2c7d030ac5d1ebca4c53e3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 18 Jan 2016 13:56:25 +0530 Subject: [PATCH] ... --- src/calibre/devices/winusb.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/devices/winusb.py b/src/calibre/devices/winusb.py index 7432bdec5f..0c169307fa 100644 --- a/src/calibre/devices/winusb.py +++ b/src/calibre/devices/winusb.py @@ -706,6 +706,12 @@ def develop(do_eject=False): # {{{ for drive in rd: eject_drive(drive) +def drives_for(vendor_id, product_id): + for usbdev in iterusbdevices(): + if usbdev.vendor_id == vendor_id and usbdev.product_id == product_id: + print('Drives for: {}'.format(usbdev)) + pprint(get_drive_letters_for_device(usbdev, debug=True)) + if __name__ == '__main__': develop() # }}}