mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 17:23:38 +02: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
1 changed files with 7 additions and 1 deletions
|
|
@ -178,7 +178,13 @@ def is_usb_connected(self, devices_on_system, debug=False,
|
|||
if cvid == vid:
|
||||
if pid in products:
|
||||
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:
|
||||
cbcd = self.BCD
|
||||
if self.test_bcd(bcd, cbcd):
|
||||
|
|
|
|||
Loading…
Reference in a new issue