projects
/
edward.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afc1f64
)
don't crash when given an invalid public key block
author
Andrew Engelbrecht
<sudoman@ninthfloor.org>
Sun, 19 Jul 2015 23:44:08 +0000
(19:44 -0400)
committer
Andrew Engelbrecht
<sudoman@ninthfloor.org>
Mon, 7 Dec 2015 18:16:28 +0000
(13:16 -0500)
edward
patch
|
blob
|
blame
|
history
diff --git
a/edward
b/edward
index cd585367bb5ef3199e4a32d5a9d4fd87f7b7b0e4..ca6ef082affc034fe44be65fb9bb19df0b9b5122 100755
(executable)
--- a/
edward
+++ b/
edward
@@
-163,11
+163,13
@@
def add_gpg_keys (text, gpgme_ctx):
fp = io.BytesIO(key_block.encode('ascii'))
result = gpgme_ctx.import_(fp)
+ imports = result.imports
- fingerprint = result.imports[0][0]
- debug("added gpg key: " + fingerprint)
+ if imports != []:
+ fingerprint = imports[0][0]
+ keys += [gpgme_ctx.get_key(fingerprint)]
- keys += [gpgme_ctx.get_key(fingerprint)]
+ debug("added gpg key: " + fingerprint)
return keys