[Pgp-tools-commit] r648 - trunk/keyart

Guilhem Moulin guilhem-guest at moszumanska.debian.org
Wed Jun 18 13:39:10 UTC 2014


Author: guilhem-guest
Date: 2014-06-18 13:39:10 +0000 (Wed, 18 Jun 2014)
New Revision: 648

Modified:
   trunk/keyart/keyart
Log:
keyart: Enable key identifiers that identify multiple keys.

Modified: trunk/keyart/keyart
===================================================================
--- trunk/keyart/keyart	2014-06-18 12:40:34 UTC (rev 647)
+++ trunk/keyart/keyart	2014-06-18 13:39:10 UTC (rev 648)
@@ -263,14 +263,17 @@
         for key in ARGS.id:
             cmd = (gpg_bin, '--fingerprint', '--with-colons', key)
             gpg = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-            out = gpg.communicate()[0].split('\n')
+            for lines in gpg.communicate()[0].split('\n'):
+                colons = lines.split(':')
+                if colons[0] == 'pub':
+                    size = colons[2]
+                    algo = colons[3]
+                elif colons[0] == 'fpr':
+                    print draw_art(size, algo, colons[9])
+                    size = None
+                    algo = None
 
-            size = out[1].split(':')[2]
-            algo = out[1].split(':')[3]
-            fpr = out[2].split(':')[9]
 
-            print draw_art(size, algo, fpr)
-
     if ARGS.file:
         for key in ARGS.file:
             cmd = (gpg_bin, '--with-fingerprint', '--with-colons', key)




More information about the Pgp-tools-commit mailing list