mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
core/sd_salt: properly await ensure_sd_card
This commit is contained in:
parent
c9fca25531
commit
0c4fa03575
@ -62,7 +62,7 @@ async def request_sd_salt(
|
||||
ctx: wire.GenericContext = wire.DUMMY_CONTEXT
|
||||
) -> Optional[bytearray]:
|
||||
while True:
|
||||
ensure_sd_card(ctx)
|
||||
await ensure_sd_card(ctx)
|
||||
try:
|
||||
return storage.sd_salt.load_sd_salt()
|
||||
except storage.sd_salt.WrongSdCard:
|
||||
|
@ -32,7 +32,7 @@ async def _set_salt(
|
||||
ctx: wire.Context, salt: bytes, salt_tag: bytes, stage: bool = False
|
||||
) -> None:
|
||||
while True:
|
||||
ensure_sd_card(ctx)
|
||||
await ensure_sd_card(ctx)
|
||||
try:
|
||||
return storage.sd_salt.set_sd_salt(salt, salt_tag, stage)
|
||||
except OSError:
|
||||
|
Loading…
Reference in New Issue
Block a user