[Pcsclite-git-commit] [PCSC] 02/03: FEATURE_GET_TLV_PROPERTIES.py: for each reader
Ludovic Rousseau
rousseau at moszumanska.debian.org
Thu Jun 30 17:01:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository PCSC.
commit 8bdfcd57dfcf9c062a3ab99a859acdcb7cd2db5a
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Thu Jun 30 16:55:39 2016 +0200
FEATURE_GET_TLV_PROPERTIES.py: for each reader
Display the properties for each connected reader.
---
UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py b/UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py
index 9501a03..ff24bb6 100755
--- a/UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py
+++ b/UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py
@@ -27,16 +27,20 @@
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import getTlvProperties, SCARD_SHARE_DIRECT
-# use the first reader
-card_connection = readers()[0].createConnection()
-card_connection.connect(mode=SCARD_SHARE_DIRECT)
-
-# get the TLV PROPERTIES
-tlv = getTlvProperties(card_connection)
-
-for key in sorted(tlv):
- if key in ["PCSCv2_PART10_PROPERTY_wIdProduct",
- "PCSCv2_PART10_PROPERTY_wIdVendor"]:
- print "%s: 0x%04X" % (key, tlv[key])
- else:
- print "%s: %s" % (key, tlv[key])
+# for each reader
+for reader in readers():
+ print
+ print "Reader:", reader
+
+ card_connection = reader.createConnection()
+ card_connection.connect(mode=SCARD_SHARE_DIRECT)
+
+ # get the TLV PROPERTIES
+ tlv = getTlvProperties(card_connection)
+
+ for key in sorted(tlv):
+ if key in ["PCSCv2_PART10_PROPERTY_wIdProduct",
+ "PCSCv2_PART10_PROPERTY_wIdVendor"]:
+ print "%s: 0x%04X" % (key, tlv[key])
+ else:
+ print "%s: %s" % (key, tlv[key])
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git
More information about the Pcsclite-cvs-commit
mailing list