[Pcsclite-cvs-commit] r3453 - /website/matrix.py

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Apr 16 11:27:45 UTC 2009


Author: rousseau
Date: Thu Apr 16 11:27:44 2009
New Revision: 3453

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3453
Log:
add a function to check that all .txt files are mentionned in
supported_readers.txt

Modified:
    website/matrix.py

Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=3453&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Thu Apr 16 11:27:44 2009
@@ -107,6 +107,24 @@
     # some USB descriptor are not listed in readers.txt?
     if len(real_list) > 0:
         raise Exception("readers %s are not listed" % real_list)
+
+def check_supported(path, all_readers):
+    """
+    Check that all .txt files are mentionned in supported_readers.txt
+    """
+    supported_readers = file(path + "supported_readers.txt").readlines()
+    # convert in a long string and in uppercase
+    s = "".join(supported_readers).upper()
+
+    display = True
+    for r in all_readers.keys():
+        pattern = "%s:%s" % (all_readers[r]['idVendor'], all_readers[r]['idProduct'])
+        if not pattern.upper() in s:
+            if display:
+                print "Reader(s) not in supported_readers.txt"
+                display = False
+            print pattern + " " + r
+    #pp.pprint(supported_readers)
 
 def get_by_manufacturer(readers):
     """
@@ -275,6 +293,7 @@
     all_readers.update(unsupported_readers)
 
     check_list(path, all_readers.keys())
+    check_supported(path, all_readers)
 
     generate_page("supported", "Supported CCID readers/ICCD tokens", "If you are a reader manufacturer and your reader is not listed here then contact me at ludovic.rousseau at free.fr", supported_readers)
     generate_page("shouldwork", "Should work but untested by me", "The CCID readers and ICCD tokens listed bellow should work with the driver but have not be validated by me. I would like to get these readers to perform test and validation and move them in the supported list above. If you are one of the manufacturers, please, contact me at ludovic.rousseau at free.fr.", shouldwork_readers)




More information about the Pcsclite-cvs-commit mailing list