mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Device detection: Fix a bug that could cause device detection to fail completely if devices with certain vendor/product ids are connected. Fixes #1009718 (Exception loading device plugins)
This commit is contained in:
parent
c86a32d92d
commit
3710b46c3c
@ -178,7 +178,13 @@ class DevicePlugin(Plugin):
|
|||||||
if cvid == vid:
|
if cvid == vid:
|
||||||
if pid in products:
|
if pid in products:
|
||||||
if hasattr(self.VENDOR_ID, 'keys'):
|
if hasattr(self.VENDOR_ID, 'keys'):
|
||||||
cbcd = self.VENDOR_ID[vid][pid]
|
try:
|
||||||
|
cbcd = self.VENDOR_ID[vid][pid]
|
||||||
|
except KeyError:
|
||||||
|
# Vendor vid does not have product pid, pid
|
||||||
|
# exists for some other vendor in this
|
||||||
|
# device
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
cbcd = self.BCD
|
cbcd = self.BCD
|
||||||
if self.test_bcd(bcd, cbcd):
|
if self.test_bcd(bcd, cbcd):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user