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

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Apr 21 07:26:32 UTC 2009


Author: rousseau
Date: Tue Apr 21 07:26:32 2009
New Revision: 3461

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3461
Log:
simplify check_supported() display

Modified:
    website/matrix.py

Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=3461&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Tue Apr 21 07:26:32 2009
@@ -106,8 +106,9 @@
 
     # some USB descriptor are not listed in readers.txt?
     if len(real_list) > 0:
-        print "Readers not listed in any .ini file:"
+        print "Reader(s) not listed in any .ini file:"
         print "\n".join(real_list)
+        print ""
 
 def check_supported(path, all_readers):
     """
@@ -117,14 +118,16 @@
     # convert in a long string and in uppercase
     s = "".join(supported_readers).upper()
 
-    display = True
+    unlisted = list()
     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
+            unlisted.append(pattern + " " + r)
+
+    if len(unlisted) > 0:
+        print "Reader(s) not in supported_readers.txt"
+        print "\n".join(unlisted)
+        print ""
     #pp.pprint(supported_readers)
 
 def get_by_manufacturer(readers):




More information about the Pcsclite-cvs-commit mailing list