1
0
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:
matejcik 2019-11-11 16:14:43 +01:00
parent c9fca25531
commit 0c4fa03575
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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: