From: <lu...@us...> - 2008-11-01 15:07:40
|
Revision: 240 http://pyscard.svn.sourceforge.net/pyscard/?rev=240&view=rev Author: ludov Date: 2008-11-01 15:07:37 +0000 (Sat, 01 Nov 2008) Log Message: ----------- PCSCCardConnection(): convert from PCSC protocol to CardConnection protocol before calling PCSCCardConnection.setProtocol() Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2008-11-01 14:50:27 UTC (rev 239) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2008-11-01 15:07:37 UTC (rev 240) @@ -96,7 +96,11 @@ raise NoCardException( 'Unable to connect: ' + SCardGetErrorMessage(hresult) ) else: raise CardConnectionException( 'Unable to connect with protocol: ' + dictProtocol[pcscprotocol] + '. ' + SCardGetErrorMessage(hresult) ) - PCSCCardConnection.setProtocol(self, dwActiveProtocol) + protocol = 0 + for p in dictProtocol: + if p == dwActiveProtocol: + protocol = eval("CardConnection.%s_protocol" % dictProtocol[p]) + PCSCCardConnection.setProtocol(self, protocol) def disconnect( self ): """Disconnect from the card.""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |