Handle capture exceptions without breaking the enrollment loop.
This commit is contained in:
parent
e9472c2ad3
commit
582d3c8f94
1 changed files with 8 additions and 3 deletions
|
|
@ -160,9 +160,14 @@ def enroll(identity, subtype):
|
|||
while True:
|
||||
glow_start_scan()
|
||||
|
||||
err = capture(enroll_prg)
|
||||
if err != 0:
|
||||
print('Error %08x, try again' % err)
|
||||
try:
|
||||
err = capture(enroll_prg)
|
||||
if err != 0:
|
||||
print('Error %08x, try again' % err)
|
||||
continue
|
||||
except Exception as e:
|
||||
print('Capture failed (%s), try again' % repr(e))
|
||||
sleep(1)
|
||||
continue
|
||||
|
||||
key = enrollment_update_start(key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue