From 10bf4242e1e52dadf3f8ee8aa34f978897a95fa1 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Mon, 8 Jul 2019 21:54:48 -0400 Subject: [PATCH] fail with more import related info --- tools/testing/tests/tester.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/testing/tests/tester.py b/tools/testing/tests/tester.py index ab7c279..a99dda5 100644 --- a/tools/testing/tests/tester.py +++ b/tools/testing/tests/tester.py @@ -73,14 +73,12 @@ class Tester: dev = next(CtapHidDevice.list_devices(), None) if not dev: - try: - from fido2.pcsc import CtapPcscDevice + from fido2.pcsc import CtapPcscDevice + + print("--- NFC ---") + print(list(CtapPcscDevice.list_devices())) + dev = next(CtapPcscDevice.list_devices(), None) - print("--- NFC ---") - print(list(CtapPcscDevice.list_devices())) - dev = next(CtapPcscDevice.list_devices(), None) - except (ModuleNotFoundError, ImportError): - print("One of NFC library is not installed properly.") if not dev: raise RuntimeError("No FIDO device found") self.dev = dev