mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix detected_device not being set
This commit is contained in:
parent
15b66c1f40
commit
105cb39e68
@ -39,9 +39,14 @@ class USBDevice:
|
|||||||
self.idVendor = dev[0]
|
self.idVendor = dev[0]
|
||||||
self.idProduct = dev[1]
|
self.idProduct = dev[1]
|
||||||
self.bcdDevice = dev[2]
|
self.bcdDevice = dev[2]
|
||||||
self.manufacturer = dev[3]
|
if iswindows:
|
||||||
self.product = dev[4]
|
# Getting this information requires communicating with the device
|
||||||
self.serial = dev[5]
|
# we only do that in the can_handle_windows() method, if needed.
|
||||||
|
self.manufacturer = self.serial = self.product = ''
|
||||||
|
else:
|
||||||
|
self.manufacturer = dev[3]
|
||||||
|
self.product = dev[4]
|
||||||
|
self.serial = dev[5]
|
||||||
|
|
||||||
def match_serial(self, serial):
|
def match_serial(self, serial):
|
||||||
return self.serial and self.serial == serial
|
return self.serial and self.serial == serial
|
||||||
|
Loading…
x
Reference in New Issue
Block a user