mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 23:40:58 +00:00
python: fix behavior of client.ping() when device is locked
This commit is contained in:
parent
3dd3d96957
commit
769ccf52c6
@ -28,6 +28,7 @@ _At the moment, the project does **not** adhere to [Semantic Versioning](https:/
|
|||||||
|
|
||||||
- correctly calculate hashes for very small firmwares [f#1082]
|
- correctly calculate hashes for very small firmwares [f#1082]
|
||||||
- unified file arguments in trezorctl
|
- unified file arguments in trezorctl
|
||||||
|
- `TrezorClient.ping()` does not crash when device is PIN-locked
|
||||||
|
|
||||||
## [0.12.0] - 2020-04-01
|
## [0.12.0] - 2020-04-01
|
||||||
[0.12.0]: https://github.com/trezor/trezor-firmware/compare/python/v0.11.6...python/v0.12.0
|
[0.12.0]: https://github.com/trezor/trezor-firmware/compare/python/v0.11.6...python/v0.12.0
|
||||||
|
@ -331,7 +331,12 @@ class TrezorClient:
|
|||||||
# XXX this should be: `with self:`
|
# XXX this should be: `with self:`
|
||||||
try:
|
try:
|
||||||
self.open()
|
self.open()
|
||||||
return self.call_raw(messages.Ping(message=msg))
|
resp = self.call_raw(messages.Ping(message=msg))
|
||||||
|
if isinstance(resp, messages.ButtonRequest):
|
||||||
|
# device is PIN-locked.
|
||||||
|
# respond and hope for the best
|
||||||
|
resp = self._callback_button(resp)
|
||||||
|
return resp
|
||||||
finally:
|
finally:
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user