Fix detected_device not being set

This commit is contained in:
Kovid Goyal 2016-01-19 16:52:21 +05:30
parent 15b66c1f40
commit 105cb39e68

View File

@ -39,6 +39,11 @@ 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]
if iswindows:
# Getting this information requires communicating with the device
# we only do that in the can_handle_windows() method, if needed.
self.manufacturer = self.serial = self.product = ''
else:
self.manufacturer = dev[3] self.manufacturer = dev[3]
self.product = dev[4] self.product = dev[4]
self.serial = dev[5] self.serial = dev[5]