mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-12 14:16:06 +00:00
chore(python): add refresh of invalid client to internal emulator
This commit is contained in:
parent
da65313341
commit
5992ce3223
@ -103,6 +103,8 @@ class Emulator:
|
||||
"""
|
||||
if self._client is None:
|
||||
raise RuntimeError
|
||||
if self._client.is_invalidated:
|
||||
self._client = self._client.get_new_client()
|
||||
return self._client
|
||||
|
||||
def make_args(self) -> List[str]:
|
||||
@ -122,7 +124,7 @@ class Emulator:
|
||||
start = time.monotonic()
|
||||
try:
|
||||
while True:
|
||||
if transport._ping():
|
||||
if transport.ping():
|
||||
break
|
||||
if self.process.poll() is not None:
|
||||
raise RuntimeError("Emulator process died")
|
||||
|
Loading…
Reference in New Issue
Block a user