mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-22 13:21:03 +00:00
client: fix short-circuited ping
(it's using call_raw so it must open its own session)
This commit is contained in:
parent
e89e6ca32e
commit
ea16d3c42a
@ -223,7 +223,12 @@ class TrezorClient:
|
||||
# raise an exception if the firmware is too old.
|
||||
# So we short-circuit the simplest variant of ping with call_raw.
|
||||
if not button_protection and not pin_protection and not passphrase_protection:
|
||||
return self.call_raw(messages.Ping(message=msg))
|
||||
# XXX this should be: `with self:`
|
||||
try:
|
||||
self.open()
|
||||
return self.call_raw(messages.Ping(message=msg))
|
||||
finally:
|
||||
self.close()
|
||||
|
||||
msg = messages.Ping(
|
||||
message=msg,
|
||||
|
Loading…
Reference in New Issue
Block a user