From: Andrew Engelbrecht Date: Sun, 27 Jul 2014 04:54:41 +0000 (-0400) Subject: make the sig output prettier. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=90bc257eb9a3ab7dff966cec184f8af87e95ce15;p=edward.git make the sig output prettier. this looks more like the gnupg output. --- 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):