remove unused functions
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Tue, 21 Jul 2015 23:15:11 +0000 (19:15 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 7 Dec 2015 18:28:38 +0000 (13:28 -0500)
edward

diff --git a/edward b/edward
index 2e671a79f5bffeae255d8aa68b1323b2bce7e1e6..04bec928c2c432b799dc453858b0ec5d22b26811 100755 (executable)
--- a/edward
+++ b/edward
@@ -326,33 +326,6 @@ def add_gpg_keys (text, gpgme_ctx):
     return fingerprints
 
 
-def decrypt_text (gpg_text, gpgme_ctx):
-
-    body = ""
-    fingerprints = []
-
-    msg_blocks = scan_and_grab(gpg_text,
-                               '-----BEGIN PGP MESSAGE-----',
-                               '-----END PGP MESSAGE-----')
-
-    plaintexts_and_sigs = decrypt_blocks(msg_blocks, gpgme_ctx)
-
-    for pair in plaintexts_and_sigs:
-        plaintext   = pair[0]
-        sigs        = pair[1]
-
-        for sig in sigs:
-            fingerprints += [sig.fpr]
-
-        # recursive for nested layers of mime and/or gpg
-        plaintext, more_fps = email_decode_flatten(plaintext, gpgme_ctx, True)
-
-        body += plaintext
-        fingerprints += more_fps
-
-    return body, fingerprints
-
-
 def verify_clear_signature (text, gpgme_ctx):
 
     sig_blocks = scan_and_grab(text,
@@ -376,24 +349,6 @@ def verify_clear_signature (text, gpgme_ctx):
     return plaintext, fingerprints
 
 
-def scan_and_grab (text, start_text, end_text):
-
-    matches = re.search('(' + start_text + '.*' + end_text + ')',
-                        text, flags=re.DOTALL)
-
-    if matches != None:
-        match_tuple = matches.groups()
-    else:
-        match_tuple = ()
-
-    return match_tuple
-
-
-def decrypt_blocks (msg_blocks, gpgme_ctx):
-
-    return [decrypt_block(block, gpgme_ctx) for block in msg_blocks]
-
-
 def decrypt_block (msg_block, gpgme_ctx):
 
     block_b = io.BytesIO(msg_block.encode('ascii'))