From: <jda...@us...> - 2010-06-11 14:34:11
|
Revision: 484 http://pyscard.svn.sourceforge.net/pyscard/?rev=484&view=rev Author: jdaussel Date: 2010-06-11 14:34:04 +0000 (Fri, 11 Jun 2010) Log Message: ----------- Replaced deprecated string exception Modified Paths: -------------- trunk/pyscard/src/smartcard/ATR.py Modified: trunk/pyscard/src/smartcard/ATR.py =================================================================== --- trunk/pyscard/src/smartcard/ATR.py 2010-06-09 16:39:44 UTC (rev 483) +++ trunk/pyscard/src/smartcard/ATR.py 2010-06-11 14:34:04 UTC (rev 484) @@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA """ +from smartcard.Exceptions import SmartcardException class ATR: """ATR class.""" @@ -38,7 +39,7 @@ def __checksyncbyte__(self): """Check validity of TS.""" if not 0x3b == self.bytes[0] and not 0x03f == self.bytes[0]: - raise 'invalid TS', "0x%-0.2x" % self.bytes[0] + raise SmartcardException( 'invalid TS' + " 0x%-0.2x" % self.bytes[0] ) def __initInstance__(self): """Parse ATR and initialize members: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |