aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/sca/test_target.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/sca/test_target.py b/test/sca/test_target.py
index 5519502..6c56d97 100644
--- a/test/sca/test_target.py
+++ b/test/sca/test_target.py
@@ -3,6 +3,8 @@ from os.path import realpath, dirname, join
from typing import Optional
from unittest import TestCase, SkipTest
+from smartcard.pcsc.PCSCExceptions import BaseSCardException
+
from pyecsca.ec.key_agreement import ECDH_SHA1
from pyecsca.ec.key_generation import KeyGeneration
from pyecsca.ec.mod import Mod
@@ -49,7 +51,10 @@ class ECTesterTargetTests(TestCase):
if not has_pyscard:
return
from smartcard.System import readers
- rs = readers()
+ try:
+ rs = readers()
+ except BaseSCardException:
+ return
if not rs:
return
cls.reader = rs[0]