[Pcsclite-cvs-commit] r5191 - /website/matrix.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Aug 26 12:10:00 UTC 2010
Author: rousseau
Date: Thu Aug 26 12:09:57 2010
New Revision: 5191
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5191
Log:
add check_descriptions() to list readers mentionned in
supported_readers.txt but without a .txt descriptor
Modified:
website/matrix.py
Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=5191&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Thu Aug 26 12:09:57 2010
@@ -151,6 +151,42 @@
if len(unlisted) > 0:
print "Reader(s) not in supported_readers.txt"
+ print "\n".join(unlisted)
+ print ""
+ #pp.pprint(supported_readers)
+
+
+def check_descriptions(path, all_readers):
+ """
+ Check that all readers mentionned in supported_readers.txt have a
+ .txt descriptor
+ """
+ supported_readers = file(path + "supported_readers.txt").readlines()
+
+ unlisted = list()
+ for line in supported_readers:
+ # skip comments
+ if line.startswith("#"):
+ continue
+
+ # remove newline
+ line = line.rstrip()
+
+ # skip empty lines
+ if line is "":
+ continue
+
+ (vendor, product, name) = line.split(":")
+ found = False
+ for r in all_readers.keys():
+ reader = all_readers[r]
+ if vendor == reader['idVendor'] and product == reader['idProduct']:
+ found = True
+ if not found:
+ unlisted.append(line)
+
+ if len(unlisted) > 0:
+ print "Reader(s) without a .txt description"
print "\n".join(unlisted)
print ""
#pp.pprint(supported_readers)
@@ -477,6 +513,7 @@
check_list(path, all_readers.keys())
check_supported(path, all_readers)
+ check_descriptions(path, all_readers)
get_driver_version(supported_readers)
get_driver_version(shouldwork_readers)
More information about the Pcsclite-cvs-commit
mailing list