mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
3a972c81cc
commit
2eed1cf179
@ -936,9 +936,11 @@ def develop(do_eject=False): # {{{
|
|||||||
for drive in rd:
|
for drive in rd:
|
||||||
eject_drive(drive)
|
eject_drive(drive)
|
||||||
|
|
||||||
def drives_for(vendor_id, product_id):
|
def drives_for(vendor_id, product_id=None):
|
||||||
for usbdev in iterusbdevices():
|
usb_devices = scan_usb_devices()
|
||||||
if usbdev.vendor_id == vendor_id and usbdev.product_id == product_id:
|
pprint(usb_devices)
|
||||||
|
for usbdev in usb_devices:
|
||||||
|
if usbdev.vendor_id == vendor_id and (product_id is None or usbdev.product_id == product_id):
|
||||||
print('Drives for: {}'.format(usbdev))
|
print('Drives for: {}'.format(usbdev))
|
||||||
pprint(get_drive_letters_for_device(usbdev, debug=True))
|
pprint(get_drive_letters_for_device(usbdev, debug=True))
|
||||||
print('USB info:', get_usb_info(usbdev, debug=True))
|
print('USB info:', get_usb_info(usbdev, debug=True))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user