1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

core/sd_salt: check if sd_salt is enabled before asking for SD card

This commit is contained in:
matejcik 2019-11-11 16:16:42 +01:00
parent 0c4fa03575
commit c96d5ab1bc

View File

@ -61,6 +61,9 @@ async def ensure_sd_card(ctx: wire.GenericContext) -> None:
async def request_sd_salt(
ctx: wire.GenericContext = wire.DUMMY_CONTEXT
) -> Optional[bytearray]:
if not storage.sd_salt.is_enabled():
return None
while True:
await ensure_sd_card(ctx)
try: