electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 828320c1af4c4b1d14011c3ff2f30e96845dd956
parent 6b13ed1f454bb04caa90a9f96c3d47b01f61b81c
Author: Neil Booth <kyuupichan@gmail.com>
Date:   Sat,  6 Feb 2016 14:33:26 +0900

trezor: provide a default interface number.

Diffstat:
Mlib/plugins.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/plugins.py b/lib/plugins.py @@ -455,7 +455,9 @@ class DeviceMgr(PrintError): for d in hid.enumerate(0, 0): product_key = (d['vendor_id'], d['product_id']) if product_key in self.recognised_hardware: - devices.append(Device(d['path'], d['interface_number'], + # Older versions of hid don't provide interface_number + interface_number = d.get('interface_number', 0) + devices.append(Device(d['path'], interface_number, d['serial_number'], product_key)) # Now find out what was disconnected