Skip to content

Commit 7e19420

Browse files
author
Bertrand256
committed
Merge remote-tracking branch 'ledger/master'
2 parents e44d6f5 + 6e985b5 commit 7e19420

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

btchip/btchip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def __init__(self, dongle):
7979
self.dongle = dongle
8080
self.needKeyCache = False
8181
try:
82-
firmware = self.getFirmwareVersion()['version'].split(".")
83-
self.multiOutputSupported = int(firmware[0]) >= 1 and int(firmware[1]) >= 1 and int(firmware[2]) >= 4
82+
firmware = self.getFirmwareVersion()['version']
83+
self.multiOutputSupported = tuple(map(int, (firmware.split(".")))) >= (1, 1, 4)
8484
if self.multiOutputSupported:
8585
self.scriptBlockLength = 50
8686
else:

btchip/btchipComm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,9 @@ def getDongle(debug=False):
220220
hidDevicePath = hidDevice['path']
221221
ledger = True
222222
if hidDevice['vendor_id'] == 0x2c97:
223-
hidDevicePath = hidDevice['path']
224-
ledger = True
223+
if ('interface_number' in hidDevice and hidDevice['interface_number'] == 0) or ('usage_page' in hidDevice and hidDevice['usage_page'] == 0xffa0):
224+
hidDevicePath = hidDevice['path']
225+
ledger = True
225226
if hidDevice['vendor_id'] == 0x2581 and hidDevice['product_id'] == 0x1807:
226227
hidDevicePath = hidDevice['path']
227228
if hidDevicePath is not None:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
here = dirname(__file__)
88
setup(
99
name='btchip-python',
10-
version='0.1.24',
10+
version='0.1.26',
1111
author='BTChip',
1212
author_email='hello@ledger.fr',
1313
description='Python library to communicate with Ledger Nano dongle',

0 commit comments

Comments
 (0)