mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'usbms-device-walk-loop-fix' of https://github.com/shastry/calibre into master
This commit is contained in:
commit
ec3110920b
@ -466,7 +466,9 @@ class Device(DeviceConfig, DevicePlugin):
|
||||
for y in ('idProduct', 'idVendor', 'bcdDevice'):
|
||||
if not os.access(j(usb_dir, y), os.R_OK):
|
||||
usb_dir = None
|
||||
continue
|
||||
break
|
||||
if usb_dir is None:
|
||||
continue
|
||||
e = lambda q : raw2num(open(j(usb_dir, q), 'rb').read().decode('utf-8'))
|
||||
ven, prod, bcd = map(e, ('idVendor', 'idProduct', 'bcdDevice'))
|
||||
if not (test(ven, 'idVendor') and test(prod, 'idProduct') and
|
||||
|
Loading…
x
Reference in New Issue
Block a user