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