[Pgp-tools-commit] r618 - trunk/keyart
Aaron Toponce
atoponce-guest at moszumanska.debian.org
Wed May 14 18:25:47 UTC 2014
Author: atoponce-guest
Date: 2014-05-14 18:25:47 +0000 (Wed, 14 May 2014)
New Revision: 618
Modified:
trunk/keyart/keyart
Log:
Test if <FILE> is an exported public PGP key.
Modified: trunk/keyart/keyart
===================================================================
--- trunk/keyart/keyart 2014-05-14 18:18:57 UTC (rev 617)
+++ trunk/keyart/keyart 2014-05-14 18:25:47 UTC (rev 618)
@@ -28,9 +28,13 @@
print "Please install GnuPG before using this script."
sys.exit(4)
-key_size = [i.strip() for i in out[0].split(':')][2]
-key_algo = [i.strip() for i in out[0].split(':')][3]
-key_fpr = [i.strip() for i in out[0].split(':')][19]
+try:
+ key_size = [i.strip() for i in out[0].split(':')][2]
+ key_algo = [i.strip() for i in out[0].split(':')][3]
+ key_fpr = [i.strip() for i in out[0].split(':')][19]
+except IndexError:
+ print "It appears that {0} is not an exported public PGP key.".format(keyfile)
+ sys.exit(5)
coin = ''
f_bytes = []
More information about the Pgp-tools-commit
mailing list