Fix exception in multi_device example.

This commit is contained in:
Dain Nilsson 2018-03-21 12:35:52 +01:00
parent 815085a3f7
commit 880db7e13d
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
1 changed files with 4 additions and 4 deletions

View File

@ -32,8 +32,8 @@ and the operation is cancelled for the others.
"""
from __future__ import print_function, absolute_import, unicode_literals
from fido_host.hid import CtapHidDevice, CtapError
from fido_host.client import Fido2Client
from fido_host.hid import CtapHidDevice
from fido_host.client import Fido2Client, ClientError
from threading import Event, Thread
import sys
@ -58,8 +58,8 @@ def work(client):
try:
attestation, client_data = client.make_credential(rp, user, challenge,
timeout=cancel)
except CtapError as e:
if e.code not in (CtapError.ERR.KEEPALIVE_CANCEL,):
except ClientError as e:
if e.code != ClientError.ERR.TIMEOUT:
raise
else:
return