[Pcsclite-cvs-commit] r6011 - /trunk/PCSC/src/spy/pcsc-spy.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Oct 7 10:25:29 UTC 2011
Author: rousseau
Date: Fri Oct 7 10:25:28 2011
New Revision: 6011
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6011
Log:
If the field to log starts with a "0x" we also log the decimal value
Modified:
trunk/PCSC/src/spy/pcsc-spy.py
Modified: trunk/PCSC/src/spy/pcsc-spy.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/pcsc-spy.py?rev=6011&op=diff
==============================================================================
--- trunk/PCSC/src/spy/pcsc-spy.py (original)
+++ trunk/PCSC/src/spy/pcsc-spy.py Fri Oct 7 10:25:28 2011
@@ -283,13 +283,21 @@
def log_in2(self, header):
""" generic log IN parameter """
data = self.filedesc.readline().strip()
- self.log_in("%s %s" % (header, data))
+ if data.startswith("0x"):
+ decimal = int(data, 16)
+ self.log_in("%s %s (%d)" % (header, data, decimal))
+ else:
+ self.log_in("%s %s" % (header, data))
return data
def log_out2(self, header):
""" generic log OUT parameter """
data = self.filedesc.readline().strip()
- self.log_out("%s %s" % (header, data))
+ if data.startswith("0x"):
+ decimal = int(data, 16)
+ self.log_out("%s %s (%d)" % (header, data, decimal))
+ else:
+ self.log_out("%s %s" % (header, data))
return data
def log_out_n_str(self, size_name, field_name):
More information about the Pcsclite-cvs-commit
mailing list