Fix displaying error message if pycvc is missing.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-10-29 11:35:54 +02:00
parent 4536589e2c
commit 3835507e00
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -24,7 +24,6 @@ try:
from smartcard.CardType import AnyCardType
from smartcard.CardRequest import CardRequest
from smartcard.Exceptions import CardRequestTimeoutException
from cvc.certificates import CVC
except:
print('ERROR: smarctard module not found! Install pyscard package.\nTry with `pip install pyscard`')
sys.exit(-1)
@ -33,6 +32,7 @@ try:
from cvc.asn1 import ASN1
from cvc.oid import oid2scheme
from cvc.utils import scheme_rsa
from cvc.certificates import CVC
from cryptography.hazmat.primitives.asymmetric import ec
except:
print('ERROR: cvc module not found! Install pycvc package.\nTry with `pip install pycvc`')