1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-26 16:18:22 +00:00

core: rework exception handling in boot.py

This commit is contained in:
Pavol Rusnak 2019-10-17 15:56:09 +00:00
parent 47246c96f9
commit 7644cb4c79
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -2,8 +2,8 @@ from trezor import config, io, log, loop, res, ui, utils
from trezor.pin import pin_to_int, show_pin_timeout
from apps.common import storage
from apps.common.request_pin import request_pin
from apps.common.sd_salt import request_sd_salt
from apps.common.request_pin import PinCancelled, request_pin
from apps.common.sd_salt import SdProtectCancelled, request_sd_salt
from apps.common.storage import device
if False:
@ -39,9 +39,11 @@ async def bootscreen() -> None:
return
else:
label = "Wrong PIN, enter again"
except Exception as e:
except (OSError, PinCancelled, SdProtectCancelled) as e:
if __debug__:
log.exception(__name__, e)
except Exception as e:
utils.halt(e.__class__.__name__)
async def lockscreen() -> None: