From 2c500fe25ae47864235db2c69ae97b97dc7c964f Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Fri, 28 Jun 2019 12:32:52 +0300 Subject: [PATCH] check pyscard module first --- tools/testing/tests/tester.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/tests/tester.py b/tools/testing/tests/tester.py index b77f690..9864417 100644 --- a/tools/testing/tests/tester.py +++ b/tools/testing/tests/tester.py @@ -1,4 +1,4 @@ -import time, struct +import time, struct, sys from fido2.hid import CtapHidDevice from fido2.client import Fido2Client @@ -68,6 +68,8 @@ 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()))