mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-25 07:48:10 +00:00
python: refresh features after ClearSession
ClearSession will clear pin and password caches, which would otherwise not be reflected in Features
This commit is contained in:
parent
122f6c8085
commit
3209e82018
@ -287,10 +287,14 @@ class TrezorClient:
|
|||||||
def get_device_id(self):
|
def get_device_id(self):
|
||||||
return self.features.device_id
|
return self.features.device_id
|
||||||
|
|
||||||
@tools.expect(messages.Success, field="message")
|
|
||||||
@tools.session
|
@tools.session
|
||||||
def clear_session(self):
|
def clear_session(self):
|
||||||
return self.call_raw(messages.ClearSession())
|
resp = self.call_raw(messages.ClearSession())
|
||||||
|
if isinstance(resp, messages.Success):
|
||||||
|
self.init_device()
|
||||||
|
return resp.message
|
||||||
|
else:
|
||||||
|
return resp
|
||||||
|
|
||||||
|
|
||||||
def MovedTo(where):
|
def MovedTo(where):
|
||||||
|
Loading…
Reference in New Issue
Block a user