some variable name changes
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Wed, 22 Jul 2015 16:32:39 +0000 (12:32 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 7 Dec 2015 18:28:39 +0000 (13:28 -0500)
... to be more specific

edward

diff --git a/edward b/edward
index ccfdce1a1e3e16483f32adea8271d7d499b45fb7..aaa52e2f34ac8fb89303441eefea69c6cd0df4ce 100755 (executable)
--- 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):