[Pcsclite-cvs-commit] r5303 - /trunk/PCSC/UnitaryTests/SCardStatus.py

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Oct 12 11:38:45 UTC 2010


Author: rousseau
Date: Tue Oct 12 11:38:38 2010
New Revision: 5303

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5303
Log:
Call SCardStatus() a second time after a keypress

Modified:
    trunk/PCSC/UnitaryTests/SCardStatus.py

Modified: trunk/PCSC/UnitaryTests/SCardStatus.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/SCardStatus.py?rev=5303&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/SCardStatus.py (original)
+++ trunk/PCSC/UnitaryTests/SCardStatus.py Tue Oct 12 11:38:38 2010
@@ -21,6 +21,7 @@
 
 from smartcard.scard import *
 from smartcard.pcsc.PCSCExceptions import *
+import sys
 
 
 hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
@@ -47,7 +48,20 @@
 print SCardGetErrorMessage(hresult)
 
 print "reader:", reader
-print "state:", state
+print "state:", hex(state)
+print "protocol:", protocol
+print "atr:", atr
+
+print "Press enter"
+sys.stdin.read(1)
+
+hresult, reader, state, protocol, atr = SCardStatus(hcard)
+if hresult != SCARD_S_SUCCESS:
+    raise BaseSCardException(hresult)
+print SCardGetErrorMessage(hresult)
+
+print "reader:", reader
+print "state:", hex(state)
 print "protocol:", protocol
 print "atr:", atr
 




More information about the Pcsclite-cvs-commit mailing list