1
0

Trezor: small improvements for device initialization

This commit is contained in:
Neil Booth
2016-01-22 19:48:04 +09:00
parent 3cd088b2e6
commit 1e030706cb
3 changed files with 16 additions and 7 deletions

View File

@@ -59,10 +59,11 @@ class GuiMixin(object):
return self.proto.PassphraseAck(passphrase=passphrase)
def callback_WordRequest(self, msg):
msg = _("Enter seed word as explained on your %s") % self.device
self.step += 1
msg = _("Step %d/24. Enter seed word as explained on "
"your %s") % (self.step, self.device)
word = self.handler.get_word(msg)
if word is None:
return self.proto.Cancel()
# Unfortunately the device can't handle self.proto.Cancel()
return self.proto.WordAck(word=word)
@@ -172,8 +173,7 @@ class TrezorClientBase(GuiMixin, PrintError):
@staticmethod
def wrapper(func):
'''Wrap base class methods to show exceptions and clear
any dialog box it opened.'''
'''Wrap methods to clear any message box they opened.'''
def wrapped(self, *args, **kwargs):
try: