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

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue May 25 14:48:48 UTC 2010


Author: rousseau
Date: Tue May 25 14:48:46 2010
New Revision: 4961

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4961
Log:
correctly sort the release numbers

Modified:
    website/matrix.py

Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=4961&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Tue May 25 14:48:46 2010
@@ -411,12 +411,19 @@
                 'dwMaxDataRate', 'dwMaxIFSD', 'dwMaxCCIDMessageLength']:
             # convert from text to decimal
             index = [(float(s.split(' ')[0]) * 1000, r) for s, r in index]
+        if f == 'release':
+            index = [(release2int(s), r) for s, r in index]
         index.sort()
         sorted_fields = list(fields)
         sorted_fields.remove(f)
         sorted_fields.insert(0, f)
         generate_table(readers, f, [r for f, r in index], sorted_fields)
 
+
+def release2int(r):
+    rr = r.split('.')
+    return int(rr[2]) + int(rr[1]) * 1000 + int(rr[0]) * 1000 * 1000
+
 if __name__ == "__main__":
     path = "../trunk/Drivers/ccid/readers/"
 




More information about the Pcsclite-cvs-commit mailing list