mirror of https://github.com/Yubico/python-fido2
Fix exception in multi_device example.
This commit is contained in:
parent
815085a3f7
commit
880db7e13d
|
@ -32,8 +32,8 @@ and the operation is cancelled for the others.
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function, absolute_import, unicode_literals
|
from __future__ import print_function, absolute_import, unicode_literals
|
||||||
|
|
||||||
from fido_host.hid import CtapHidDevice, CtapError
|
from fido_host.hid import CtapHidDevice
|
||||||
from fido_host.client import Fido2Client
|
from fido_host.client import Fido2Client, ClientError
|
||||||
from threading import Event, Thread
|
from threading import Event, Thread
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -58,8 +58,8 @@ def work(client):
|
||||||
try:
|
try:
|
||||||
attestation, client_data = client.make_credential(rp, user, challenge,
|
attestation, client_data = client.make_credential(rp, user, challenge,
|
||||||
timeout=cancel)
|
timeout=cancel)
|
||||||
except CtapError as e:
|
except ClientError as e:
|
||||||
if e.code not in (CtapError.ERR.KEEPALIVE_CANCEL,):
|
if e.code != ClientError.ERR.TIMEOUT:
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue