[Pcsclite-git-commit] [pcsc-tools] 02/02: sort_smartcard_list.py: compute the number of ATR

Ludovic Rousseau rousseau at moszumanska.debian.org
Thu May 19 18:29:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository pcsc-tools.

commit 3b22a64b4b63096cbe90125230fff2a8111fd057
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu May 19 20:28:16 2016 +0200

    sort_smartcard_list.py: compute the number of ATR
    
    Display the number of ATRs that are new and not yet committed
---
 sort_smartcard_list.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/sort_smartcard_list.py b/sort_smartcard_list.py
index 1f056d7..71b2d56 100755
--- a/sort_smartcard_list.py
+++ b/sort_smartcard_list.py
@@ -33,3 +33,19 @@ sorted_ATRs.sort()
 
 for l in difflib.context_diff(ATRs, sorted_ATRs):
     print l
+
+# compte le nombre de nouveau ATR
+from subprocess import Popen, PIPE
+
+p1 = Popen(["git", "diff"], stdout=PIPE)
+p2 = Popen(["grep", "+3[B,F]"], stdin=p1.stdout, stdout=PIPE)
+p1.stdout.close()
+output = p2.communicate()[0]
+
+size = len(output.split("\n"))-1
+if size >= 10:
+    print
+    print "********************"
+    print "    %d new ATRs" % size
+    print "********************"
+    print

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/pcsc-tools.git



More information about the Pcsclite-cvs-commit mailing list