mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-09 10:28:46 +00:00
fix(python): partially fix shamir persistence tests
This commit is contained in:
parent
d015ccc611
commit
738724990c
@ -59,6 +59,7 @@ class BackgroundDeviceHandler:
|
|||||||
def run_with_session(
|
def run_with_session(
|
||||||
self,
|
self,
|
||||||
function: t.Callable[tx.Concatenate["Session", P], t.Any],
|
function: t.Callable[tx.Concatenate["Session", P], t.Any],
|
||||||
|
seedless: bool = False,
|
||||||
*args: P.args,
|
*args: P.args,
|
||||||
**kwargs: P.kwargs,
|
**kwargs: P.kwargs,
|
||||||
) -> None:
|
) -> None:
|
||||||
@ -70,7 +71,10 @@ class BackgroundDeviceHandler:
|
|||||||
raise RuntimeError("Wait for previous task first")
|
raise RuntimeError("Wait for previous task first")
|
||||||
|
|
||||||
# wait for the first UI change triggered by the task running in the background
|
# wait for the first UI change triggered by the task running in the background
|
||||||
session = self.client.get_session()
|
if seedless:
|
||||||
|
session = self.client.get_seedless_session()
|
||||||
|
else:
|
||||||
|
session = self.client.get_session()
|
||||||
with self.debuglink().wait_for_layout_change():
|
with self.debuglink().wait_for_layout_change():
|
||||||
self.task = self._pool.submit(function, session, *args, **kwargs)
|
self.task = self._pool.submit(function, session, *args, **kwargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user