[Pcsclite-cvs-commit] r4299 - /trunk/PCSC/UnitaryTests/SCardCancel.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Jul 3 13:27:18 UTC 2009
Author: rousseau
Date: Fri Jul 3 13:27:17 2009
New Revision: 4299
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4299
Log:
do not raise an exception if the return code is the expected SCARD_E_CANCELLED
Modified:
trunk/PCSC/UnitaryTests/SCardCancel.py
Modified: trunk/PCSC/UnitaryTests/SCardCancel.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/SCardCancel.py?rev=4299&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/SCardCancel.py (original)
+++ trunk/PCSC/UnitaryTests/SCardCancel.py Fri Jul 3 13:27:17 2009
@@ -54,7 +54,10 @@
hresult, newstates = SCardGetStatusChange(hcontext, 10000, readerstates.values())
if hresult!=SCARD_S_SUCCESS and hresult!=SCARD_E_TIMEOUT:
- raise Exception('Failed to SCardGetStatusChange: ' + SCardGetErrorMessage(hresult))
+ if SCARD_E_CANCELLED == hresult:
+ print "SCardGetStatusChange() cancelled"
+ else:
+ raise Exception('Failed to SCardGetStatusChange: ' + SCardGetErrorMessage(hresult))
hresult = SCardReleaseContext(hcontext)
if hresult!=SCARD_S_SUCCESS:
More information about the Pcsclite-cvs-commit
mailing list