From a1e78114869b3378d6df7e8c98a7c10a7103ba7e Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Sun, 19 Jul 2015 20:03:34 -0400 Subject: [PATCH] simplified unattractive code --- edward | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/edward b/edward index cb63148..49b72f4 100755 --- a/edward +++ b/edward @@ -89,14 +89,13 @@ def email_decode_flatten (email_text, gpgme_ctx, from_decryption): continue if content_type == "application/pgp-encrypted": - if description == "PGP/MIME version identification": - if payload.strip() != "Version: 1": - print(progname + ": Warning: unknown " \ - + description + ": " \ - + payload.strip(), file=sys.stderr) + if ((description == "PGP/MIME version identification") + and (payload.strip() != "Version: 1")): + debug("Warning: unknown " + description + + ": " + payload.strip()) + # ignore the version number continue - if (filename == "encrypted.asc") or (content_type == "pgp/mime"): plaintext, more_keys = decrypt_text(payload, gpgme_ctx) -- 2.25.1