1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-15 06:45:59 +00:00

fix(python): partially fix shamir persistence tests

This commit is contained in:
M1nd3r 2025-03-11 16:10:45 +01:00
parent 9349e83461
commit 39790517c2

View File

@ -59,6 +59,7 @@ class BackgroundDeviceHandler:
def run_with_session(
self,
function: t.Callable[tx.Concatenate["Session", P], t.Any],
seedless: bool = False,
*args: P.args,
**kwargs: P.kwargs,
) -> None:
@ -70,7 +71,10 @@ class BackgroundDeviceHandler:
raise RuntimeError("Wait for previous task first")
# 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():
self.task = self._pool.submit(function, session, *args, **kwargs)