[Pcsclite-cvs-commit] r4789 - in /trunk/PCSC/UnitaryTests: MCT_ReaderDirect.py control_get_firmware.py control_switch_interface.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Mar 4 10:55:05 UTC 2010
Author: rousseau
Date: Thu Mar 4 10:55:03 2010
New Revision: 4789
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4789
Log:
use list comprehension instead of map() (more efficient and pylint does
not like map())
Modified:
trunk/PCSC/UnitaryTests/MCT_ReaderDirect.py
trunk/PCSC/UnitaryTests/control_get_firmware.py
trunk/PCSC/UnitaryTests/control_switch_interface.py
Modified: trunk/PCSC/UnitaryTests/MCT_ReaderDirect.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/MCT_ReaderDirect.py?rev=4789&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/MCT_ReaderDirect.py (original)
+++ trunk/PCSC/UnitaryTests/MCT_ReaderDirect.py Thu Mar 4 10:55:03 2010
@@ -36,7 +36,7 @@
print "tag: %02X, length: %2d:" % (tag, length),
if tag in [0x40, 0x80, 0x81, 0x83, 0x84]:
- print "'%s'" % ''.join(map(chr, data))
+ print "'%s'" % ''.join([chr(x) for x in data])
else:
print toHexString(data)
@@ -49,7 +49,7 @@
print "parse the SECODER SELECT APPLICATION answer:", toHexString(bytes)
print "Activation ID:", toHexString(bytes[0:4])
- print "Interface Version: '%s'" % ''.join(map(chr, bytes[5:11]))
+ print "Interface Version: '%s'" % ''.join([chr(x) for x in bytes[5:11]])
print "Language Code:", toHexString(bytes[11:15])
print "CSI:", toHexString(bytes[15:18])
print "Application Identifier:", toHexString(bytes[18:23])
Modified: trunk/PCSC/UnitaryTests/control_get_firmware.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/control_get_firmware.py?rev=4789&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/control_get_firmware.py (original)
+++ trunk/PCSC/UnitaryTests/control_get_firmware.py Thu Mar 4 10:55:03 2010
@@ -30,4 +30,4 @@
res = cardConnection.control(IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE,
get_firmware)
print "Reader:", reader
- print "Firmware:", "".join(map(chr, res))
+ print "Firmware:", "".join([chr(x) for x in res])
Modified: trunk/PCSC/UnitaryTests/control_switch_interface.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/control_switch_interface.py?rev=4789&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/control_switch_interface.py (original)
+++ trunk/PCSC/UnitaryTests/control_switch_interface.py Thu Mar 4 10:55:03 2010
@@ -50,7 +50,7 @@
elif err == 0xFF84:
print "Wrong command bytes"
else:
- print "Unknown error:", map(hex, res)
+ print "Unknown error:", [hex(x) for x in res]
else:
print "Success"
More information about the Pcsclite-cvs-commit
mailing list