From 9eb78301fa57659f049c65bd6551ffecdbc6c130 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Sun, 27 Jul 2014 01:44:25 -0400 Subject: [PATCH] re-organized a couple lines of code this order of execution is more logical --- edward-bot | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/edward-bot b/edward-bot index 1ca0f9b..de03d4c 100755 --- a/edward-bot +++ b/edward-bot @@ -108,7 +108,10 @@ def print_decrypted (message): def print_sig (sig): fprint = sig.fpr + fprint_short = re.search("[0-9A-Fa-f]{32}([0-9A-Fa-f]{8})", fprint).groups()[0] + timestamp = time.localtime(sig.timestamp) + date = time.strftime("%a %d %b %Y %I:%M:%S %p %Z", timestamp) g = gpgme.Context() key = g.get_key(fprint) @@ -122,9 +125,6 @@ def print_sig (sig): 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] - # this section needs some work. signature summary, validity, status, # and wrong_key_usage all complicate the picture. their enum/#define # values overlap, which makes things more complicated. @@ -138,6 +138,7 @@ def print_sig (sig): else: status = "BAD Signature " + print("Signature Made " + date + " using key ID " + fprint_short) print(status + "from " + name + " (" + comment + ") <" \ + e_addr + ">") -- 2.25.1