From 471abe6950b655578c30b37602ce517591a498b7 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Fri, 6 May 2022 14:06:18 +0200 Subject: [PATCH] vicc: fixed error printing --- .../src/vpicc/virtualsmartcard/cards/Relay.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/cards/Relay.py b/virtualsmartcard/src/vpicc/virtualsmartcard/cards/Relay.py index d4a27c5..da66180 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/cards/Relay.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/cards/Relay.py @@ -53,7 +53,7 @@ class RelayOS(SmartcardOS): try: self.session = smartcard.Session(self.reader) except smartcard.Exceptions.CardConnectionException as e: - logging.critical("Error connecting to card: %s", e.message) + logging.critical("Error connecting to card: %s", str(e)) sys.exit() logging.info("Connected to card in '%s'", self.reader) @@ -69,7 +69,7 @@ class RelayOS(SmartcardOS): try: self.session.close() except smartcard.Exceptions.CardConnectionException as e: - logging.warning("Error disconnecting from card: %s", e.message) + logging.warning("Error disconnecting from card: %s", str(e)) def getATR(self): # when powerDown has been called, fetching the ATR will throw an error. @@ -83,7 +83,7 @@ class RelayOS(SmartcardOS): self.session = smartcard.Session(self.reader) atr = self.session.getATR() except smartcard.Exceptions.CardConnectionException as e: - logging.critical("Error getting ATR: %s", e.message) + logging.critical("Error getting ATR: %s", str(e)) sys.exit() return "".join([chr(b) for b in atr]) @@ -99,7 +99,7 @@ class RelayOS(SmartcardOS): try: self.session = smartcard.Session(self.reader) except smartcard.Exceptions.CardConnectionException as e: - logging.critical("Error connecting to card: %s", e.message) + logging.critical("Error connecting to card: %s", str(e)) sys.exit() def powerDown(self):