From: Andrew Engelbrecht Date: Tue, 21 Jul 2015 23:15:11 +0000 (-0400) Subject: remove unused functions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=172d9a67e30e3ac5d3e8e7671205beb11ef465d2;p=edward.git remove unused functions --- diff --git a/edward b/edward index 2e671a7..04bec92 100755 --- 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'))