[Pcsclite-cvs-commit] r2456 - trunk/pycsc/PyCSC

Ludovic Rousseau rousseau at alioth.debian.org
Mon Mar 5 15:18:22 CET 2007


Author: rousseau
Date: 2007-03-05 14:18:22 +0000 (Mon, 05 Mar 2007)
New Revision: 2456

Modified:
   trunk/pycsc/PyCSC/__init__.py
Log:
convert ATR and SW to uppercase


Modified: trunk/pycsc/PyCSC/__init__.py
===================================================================
--- trunk/pycsc/PyCSC/__init__.py	2007-03-05 13:26:48 UTC (rev 2455)
+++ trunk/pycsc/PyCSC/__init__.py	2007-03-05 14:18:22 UTC (rev 2456)
@@ -36,7 +36,7 @@
     def __init__(self, reader, mode, protocol):
         self.pycsc = PyCSC.pycsc.pycsc(reader = reader, mode = mode, protocol = protocol)
         self.readerName = self.pycsc.status()["ReaderName"]
-        self.atr = binascii.b2a_hex(self.pycsc.status()["ATR"])
+        self.atr = binascii.b2a_hex(self.pycsc.status()["ATR"]).upper()
 
     def transmit(self, apdu):
         """
@@ -50,7 +50,7 @@
         @rtype: list of strings
         """
         resp = self.pycsc.transmit(binascii.a2b_hex(apdu))
-        resp = binascii.b2a_hex(resp)
+        resp = binascii.b2a_hex(resp).upper()
         # split result and SW
         return (resp[:-4], resp[-4:])
 




More information about the Pcsclite-cvs-commit mailing list