From: <lu...@us...> - 2011-04-26 16:51:19
|
Revision: 529 http://pyscard.svn.sourceforge.net/pyscard/?rev=529&view=rev Author: ludov Date: 2011-04-26 16:51:13 +0000 (Tue, 26 Apr 2011) Log Message: ----------- Correctly get the TCK (checksum) byte Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2011-04-23 15:02:33 UTC (rev 528) +++ trunk/contrib/parseATR/parseATR.py 2011-04-26 16:51:13 UTC (rev 529) @@ -123,7 +123,12 @@ # Store historical bytes atr["hb"] = atr_txt[pointer + 1: pointer + 1 + hb_length] + # Store TCK last = pointer + 1 + hb_length + if "TCK" in atr: + atr["TCK"] = atr_txt[last] + last += 1 + if len(atr_txt) > last: atr["extra"] = atr_txt[last:] @@ -135,10 +140,6 @@ (t1, t2) = ("", "is") raise ParseAtrException("ERROR! ATR is truncated: %d byte%s %s missing" % (missing, t1, t2)) - # Store TCK - if "TCK" in atr: - atr["TCK"] = atr_txt[-1] - return atr This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |