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:
|
while True:
|
||||||
glow_start_scan()
|
glow_start_scan()
|
||||||
|
|
||||||
err = capture(enroll_prg)
|
try:
|
||||||
if err != 0:
|
err = capture(enroll_prg)
|
||||||
print('Error %08x, try again' % err)
|
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
|
continue
|
||||||
|
|
||||||
key = enrollment_update_start(key)
|
key = enrollment_update_start(key)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue