Fix exception handling in PIN
This commit is contained in:
parent
56fc84a9e0
commit
dddb1e7548
20
src/boot.py
20
src/boot.py
|
@ -8,15 +8,19 @@ from apps.common.request_pin import request_pin
|
|||
|
||||
async def unlock_layout():
|
||||
while True:
|
||||
if config.has_pin():
|
||||
pin = await request_pin()
|
||||
else:
|
||||
pin = ''
|
||||
if config.unlock(pin_to_int(pin), show_pin_timeout):
|
||||
return
|
||||
else:
|
||||
await unlock_failed()
|
||||
try:
|
||||
if config.has_pin():
|
||||
pin = await request_pin()
|
||||
else:
|
||||
pin = ''
|
||||
|
||||
if config.unlock(pin_to_int(pin), show_pin_timeout):
|
||||
return
|
||||
else:
|
||||
await unlock_failed()
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
async def unlock_failed():
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue