[Pcsclite-cvs-commit] r6545 - /website/matrix.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Mar 1 17:01:07 UTC 2013
Author: rousseau
Date: Fri Mar 1 17:01:07 2013
New Revision: 6545
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6545
Log:
Reorder features
Put the 'contactless' feature in first position so it is possible to
sort by features and have all the contactless reades at the same place.
Modified:
website/matrix.py
Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=6545&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Fri Mar 1 17:01:07 2013
@@ -632,6 +632,33 @@
return 99 * 1000 * 1000
+def reorder_feature(reader, feature):
+ """
+ put the given feature in first position
+ """
+ features = reader['features']
+ # does the reader have the contactless feature?
+ if feature in features:
+ # put it in the first position
+ index = features.index('contactless')
+ print features
+ if index != 0:
+ features[index], features[0] = features[0], features[index]
+ print features
+ print
+
+
+def reorder_features(readers):
+ """
+ Change the order of the features
+ """
+ for reader in readers:
+ reader = readers[reader]
+ reorder_feature(reader, 'contactless')
+ if 'interface' in reader:
+ reorder_feature(reader['interface'], 'contactless')
+
+
def main():
"""
Generate every thing
@@ -653,6 +680,8 @@
check_supported(path, all_readers)
check_descriptions(path, all_readers)
+ reorder_features(all_readers)
+
get_driver_version(supported_readers)
get_driver_version(shouldwork_readers)
get_driver_version(unsupported_readers)
More information about the Pcsclite-cvs-commit
mailing list