From 90bc257eb9a3ab7dff966cec184f8af87e95ce15 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Sun, 27 Jul 2014 00:54:41 -0400 Subject: [PATCH] make the sig output prettier. this looks more like the gnupg output. --- edward-bot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/edward-bot b/edward-bot index 784767a..d83f70b 100755 --- a/edward-bot +++ b/edward-bot @@ -111,22 +111,22 @@ def print_sig (sig): print("bad sig: " + str(sig.summary)) #continue - fpr = sig.fpr + fprint = sig.fpr timestamp = time.localtime(sig.timestamp) g = gpgme.Context() - key = g.get_key(fpr) + key = g.get_key(fprint) name = key.uids[0].name e_addr = key.uids[0].email comment = key.uids[0].comment date = time.strftime("%a %d %b %Y %I:%M:%S %p %Z", timestamp) + fprint_short = re.search("[0-9A-Fa-f]{32}([0-9A-Fa-f]{8})", fprint).groups()[0] - print("sig from: " + name + " (" + comment + ") <" \ + print("Signature Made " + date + " using key " + fprint_short) + print("From " + name + " (" + comment + ") <" \ + e_addr + ">") - print("fingerprint: " + fpr) - print("date: " + date) def decrypt_payload (payload): -- 2.25.1