mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-07 21:22:41 +00:00
chore(python): add refresh of invalid client to internal emulator
[no changelog]
This commit is contained in:
parent
9d4d962998
commit
167c8a107f
@ -93,6 +93,8 @@ class Emulator:
|
|||||||
"""
|
"""
|
||||||
if self._client is None:
|
if self._client is None:
|
||||||
raise RuntimeError
|
raise RuntimeError
|
||||||
|
if self._client.is_invalidated:
|
||||||
|
self._client = self._client.get_new_client()
|
||||||
return self._client
|
return self._client
|
||||||
|
|
||||||
def make_args(self) -> List[str]:
|
def make_args(self) -> List[str]:
|
||||||
@ -112,7 +114,7 @@ class Emulator:
|
|||||||
start = time.monotonic()
|
start = time.monotonic()
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
if transport._ping():
|
if transport.ping():
|
||||||
break
|
break
|
||||||
if self.process.poll() is not None:
|
if self.process.poll() is not None:
|
||||||
raise RuntimeError("Emulator process died")
|
raise RuntimeError("Emulator process died")
|
||||||
|
Loading…
Reference in New Issue
Block a user