From 832106347d8bfe24fd07bdc1456bc635cf2162b4 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Sun, 19 Jul 2015 18:32:24 -0400 Subject: [PATCH] fixed key format bug --- edward | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/edward b/edward index d4321a8..793316c 100755 --- a/edward +++ b/edward @@ -154,22 +154,22 @@ def get_email_subpart_info (part): def add_gpg_keys (text, gpgme_ctx): - keys = scan_and_grab(text, - '-----BEGIN PGP PUBLIC KEY BLOCK-----', - '-----END PGP PUBLIC KEY BLOCK-----') + key_blocks = scan_and_grab(text, + '-----BEGIN PGP PUBLIC KEY BLOCK-----', + '-----END PGP PUBLIC KEY BLOCK-----') - fps = [] - for key in keys: - fp = io.BytesIO(key.encode('ascii')) + keys = [] + for key_block in key_blocks: + fp = io.BytesIO(key_block.encode('ascii')) result = gpgme_ctx.import_(fp) fingerprint = result.imports[0][0] debug("added gpg key: " + fingerprint) - fps += fingerprint + keys += [gpgme_ctx.get_key(fingerprint)] - return fps + return keys def decrypt_text (gpg_text, gpgme_ctx): -- 2.25.1