From 99278f7d08a5479802a7b944098c473c14f41621 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 5 Nov 2018 21:30:50 +0100 Subject: [PATCH] client: PassphraseState is not mandatory (missing on T1 in fact) --- trezorlib/client.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/trezorlib/client.py b/trezorlib/client.py index 42d76abbc3..265ff87f10 100644 --- a/trezorlib/client.py +++ b/trezorlib/client.py @@ -127,11 +127,12 @@ class BaseClient(object): else: passphrase = self.ui.get_passphrase() - state_request = self.call_raw(proto.PassphraseAck(passphrase=passphrase)) - if not isinstance(state_request, proto.PassphraseStateRequest): - raise exceptions.TrezorException("Passphrase state missing") - self.state = state_request.state - return self.call_raw(proto.PassphraseStateAck()) + resp = self.call_raw(proto.PassphraseAck(passphrase=passphrase)) + if isinstance(resp, proto.PassphraseStateRequest): + self.state = resp.state + return self.call_raw(proto.PassphraseStateAck()) + else: + return resp def callback_ButtonRequest(self, msg): __tracebackhide__ = True # for pytest # pylint: disable=W0612