Fix derivePassphrase for Python 2

This commit is contained in:
BTChip 2017-01-25 19:25:01 +01:00
parent 53a76b055e
commit ae02835796
2 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@ from .comm import getDongle
import argparse import argparse
import getpass import getpass
import unicodedata import unicodedata
import sys
def auto_int(x): def auto_int(x):
return int(x, 0) return int(x, 0)
@ -33,6 +34,8 @@ args = parser.parse_args()
dongle = getDongle(False) dongle = getDongle(False)
passphrase = getpass.getpass("Enter BIP39 passphrase : ") passphrase = getpass.getpass("Enter BIP39 passphrase : ")
if isinstance(passphrase, bytes):
passphrase = passphrase.decode(sys.stdin.encoding)
if len(passphrase) != 0: if len(passphrase) != 0:
if args.persistent: if args.persistent:
p1 = 0x02 p1 = 0x02

View File

@ -8,7 +8,7 @@ import os
here = dirname(__file__) here = dirname(__file__)
setup( setup(
name='ledgerblue', name='ledgerblue',
version='0.1.9', version='0.1.10',
author='Ledger', author='Ledger',
author_email='hello@ledger.fr', author_email='hello@ledger.fr',
description='Python library to communicate with Ledger Blue/Nano S', description='Python library to communicate with Ledger Blue/Nano S',