python: refresh features after ClearSession

ClearSession will clear pin and password caches, which would otherwise
not be reflected in Features
pull/467/head
matejcik 5 years ago
parent 122f6c8085
commit 3209e82018

@ -287,10 +287,14 @@ class TrezorClient:
def get_device_id(self):
return self.features.device_id
@tools.expect(messages.Success, field="message")
@tools.session
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):

Loading…
Cancel
Save