From 795cf5c4a1653ae811761913d8e3da35e69eded4 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Tue, 2 Jul 2019 19:55:04 +0300 Subject: [PATCH] selecting NFC key works --- tools/testing/tests/tester.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/testing/tests/tester.py b/tools/testing/tests/tester.py index 69fe808..21759ee 100644 --- a/tools/testing/tests/tester.py +++ b/tools/testing/tests/tester.py @@ -68,14 +68,12 @@ class Tester: dev = next(CtapHidDevice.list_devices(), None) if not dev: try: - from fido2.nfc import CtapNfcDevice + from fido2.pcsc import CtapPcscDevice print("--- NFC ---") - print(list(CtapNfcDevice.list_devices())) - dev = next(CtapNfcDevice.list_devices(), None) - except ModuleNotFoundError: + print(list(CtapPcscDevice.list_devices())) + dev = next(CtapPcscDevice.list_devices(), None) + except (ModuleNotFoundError, ImportError) as e: print("One of NFC library is not installed properly.") - except Exception as e: - print("NFC devices is not supported", e, e.__class__.__name__) if not dev: raise RuntimeError("No FIDO device found") self.dev = dev