mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix for bug in windows detection of BeBook
This commit is contained in:
parent
aeae9e613a
commit
04d8e251c5
@ -61,14 +61,15 @@ class DeviceScanner(object):
|
|||||||
vendor_ids = device.VENDOR_ID if hasattr(device.VENDOR_ID, '__len__') else [device.VENDOR_ID]
|
vendor_ids = device.VENDOR_ID if hasattr(device.VENDOR_ID, '__len__') else [device.VENDOR_ID]
|
||||||
product_ids = device.PRODUCT_ID if hasattr(device.PRODUCT_ID, '__len__') else [device.PRODUCT_ID]
|
product_ids = device.PRODUCT_ID if hasattr(device.PRODUCT_ID, '__len__') else [device.PRODUCT_ID]
|
||||||
if iswindows:
|
if iswindows:
|
||||||
for vendor_id, product_id in zip(vendor_ids, product_ids):
|
for vendor_id in vendor_ids:
|
||||||
vid, pid = 'vid_%4.4x'%vendor_id, 'pid_%4.4x'%product_id
|
for product_id in product_ids:
|
||||||
vidd, pidd = 'vid_%i'%vendor_id, 'pid_%i'%product_id
|
vid, pid = 'vid_%4.4x'%vendor_id, 'pid_%4.4x'%product_id
|
||||||
for device_id in self.devices:
|
vidd, pidd = 'vid_%i'%vendor_id, 'pid_%i'%product_id
|
||||||
if (vid in device_id or vidd in device_id) and (pid in device_id or pidd in device_id):
|
for device_id in self.devices:
|
||||||
if self.test_bcd_windows(device_id, getattr(device, 'BCD', None)):
|
if (vid in device_id or vidd in device_id) and (pid in device_id or pidd in device_id):
|
||||||
if device.can_handle(device_id):
|
if self.test_bcd_windows(device_id, getattr(device, 'BCD', None)):
|
||||||
return True
|
if device.can_handle(device_id):
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
for vendor, product, bcdDevice in self.devices:
|
for vendor, product, bcdDevice in self.devices:
|
||||||
if vendor in vendor_ids and product in product_ids:
|
if vendor in vendor_ids and product in product_ids:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user