From f8ee6bd3a6089c922f8c56f862f7736308e2264d Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 22 Jul 2015 12:32:39 -0400 Subject: [PATCH] some variable name changes ... to be more specific --- edward | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/edward b/edward index ccfdce1..aaa52e2 100755 --- a/edward +++ b/edward @@ -276,28 +276,28 @@ def gpg_on_payloads (eddy_obj, gpgme_ctx, prev_parts=[]): piece.gpg_data.plainobj = parse_pgp_mime(plaintext, gpgme_ctx) elif piece.piece_type == "pubkey": - fingerprints = add_gpg_key(piece.string, gpgme_ctx) + key_fps = add_gpg_key(piece.string, gpgme_ctx) - if fingerprints != []: + if key_fps != []: piece.gpg_data = GPGData() - piece.gpg_data.keys = fingerprints + piece.gpg_data.keys = key_fps elif piece.piece_type == "clearsign": - (plaintext, fingerprints) = verify_clear_signature(piece.string, gpgme_ctx) + (plaintext, sig_fps) = verify_clear_signature(piece.string, gpgme_ctx) - if fingerprints != []: + if sig_fps != []: piece.gpg_data = GPGData() - piece.gpg_data.sigs = fingerprints + piece.gpg_data.sigs = sig_fps piece.gpg_data.plainobj = parse_pgp_mime(plaintext, gpgme_ctx) elif piece.piece_type == "detachedsig": for prev in prev_parts: payload_bytes = prev.payload_bytes - sigs_fps = verify_detached_signature(piece.string, payload_bytes, gpgme_ctx) + sig_fps = verify_detached_signature(piece.string, payload_bytes, gpgme_ctx) - if sigs_fps != []: + if sig_fps != []: piece.gpg_data = GPGData() - piece.gpg_data.sigs = sigs_fps + piece.gpg_data.sigs = sig_fps piece.gpg_data.plainobj = prev else: pass @@ -344,16 +344,16 @@ def add_gpg_key (key_block, gpgme_ctx): result = gpgme_ctx.import_(fp) imports = result.imports - fingerprints = [] + key_fingerprints = [] if imports != []: for import_ in imports: fingerprint = import_[0] - fingerprints += [fingerprint] + key_fingerprints += [fingerprint] debug("added gpg key: " + fingerprint) - return fingerprints + return key_fingerprints def verify_clear_signature (sig_block, gpgme_ctx): @@ -368,11 +368,11 @@ def verify_clear_signature (sig_block, gpgme_ctx): # FIXME: this might require using the charset of the mime part. plaintext = ptxt_fp.getvalue().decode('utf-8') - fingerprints = [] + sig_fingerprints = [] for res_ in result: - fingerprints += [res_.fpr] + sig_fingerprints += [res_.fpr] - return plaintext, fingerprints + return plaintext, sig_fingerprints def verify_detached_signature (detached_sig, plaintext_bytes, gpgme_ctx): -- 2.25.1