From d1722b85af7a61a14df76edc6982397dec77f2dd Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Tue, 2 Jul 2019 19:45:46 +0300 Subject: [PATCH] add library not found error --- tools/testing/tests/tester.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/tests/tester.py b/tools/testing/tests/tester.py index 9864417..69fe808 100644 --- a/tools/testing/tests/tester.py +++ b/tools/testing/tests/tester.py @@ -68,14 +68,14 @@ class Tester: dev = next(CtapHidDevice.list_devices(), None) if not dev: try: - if 'pyscard' not in sys.modules: - print('You have not installed pyscard module') from fido2.nfc import CtapNfcDevice print("--- NFC ---") print(list(CtapNfcDevice.list_devices())) dev = next(CtapNfcDevice.list_devices(), None) - except: - print("NFC devices is not supported") + except ModuleNotFoundError: + 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