Skip to content

Commit

Permalink
Merge remote-tracking branch 'ledger/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertrand256 committed Mar 21, 2018
2 parents e44d6f5 + 6e985b5 commit 7e19420
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions btchip/btchip.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def __init__(self, dongle):
self.dongle = dongle
self.needKeyCache = False
try:
firmware = self.getFirmwareVersion()['version'].split(".")
self.multiOutputSupported = int(firmware[0]) >= 1 and int(firmware[1]) >= 1 and int(firmware[2]) >= 4
firmware = self.getFirmwareVersion()['version']
self.multiOutputSupported = tuple(map(int, (firmware.split(".")))) >= (1, 1, 4)
if self.multiOutputSupported:
self.scriptBlockLength = 50
else:
Expand Down
5 changes: 3 additions & 2 deletions btchip/btchipComm.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ def getDongle(debug=False):
hidDevicePath = hidDevice['path']
ledger = True
if hidDevice['vendor_id'] == 0x2c97:
hidDevicePath = hidDevice['path']
ledger = True
if ('interface_number' in hidDevice and hidDevice['interface_number'] == 0) or ('usage_page' in hidDevice and hidDevice['usage_page'] == 0xffa0):
hidDevicePath = hidDevice['path']
ledger = True
if hidDevice['vendor_id'] == 0x2581 and hidDevice['product_id'] == 0x1807:
hidDevicePath = hidDevice['path']
if hidDevicePath is not None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
here = dirname(__file__)
setup(
name='btchip-python',
version='0.1.24',
version='0.1.26',
author='BTChip',
author_email='[email protected]',
description='Python library to communicate with Ledger Nano dongle',
Expand Down

0 comments on commit 7e19420

Please sign in to comment.