From 3a71a5a05c40a3dfde56a4d64aa644679beff716 Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 5 Mar 2020 12:58:09 +0100 Subject: [PATCH] core/sdcard: show "Wrong SD card" when unlocking SD protect with unformatted card --- core/src/apps/common/sdcard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/apps/common/sdcard.py b/core/src/apps/common/sdcard.py index b51ffd75cf..66dca56792 100644 --- a/core/src/apps/common/sdcard.py +++ b/core/src/apps/common/sdcard.py @@ -127,12 +127,12 @@ async def request_sd_salt( await ensure_sdcard(ctx, ensure_filesystem=False) try: return storage.sd_salt.load_sd_salt() - except storage.sd_salt.WrongSdCard: + except (storage.sd_salt.WrongSdCard, fatfs.NoFilesystem): if not await _wrong_card_dialog(ctx): raise SdCardUnavailable("Wrong SD card.") except OSError: - # Generic problem with loading the SD salt (either we could not read the - # file, or there is a staged salt which cannot be committed). + # Generic problem with loading the SD salt (hardware problem, or we could + # not read the file, or there is a staged salt which cannot be committed). # In either case, there is no good way to recover. If the user clicks Retry, # we will try again. if not await sd_problem_dialog(ctx):