summaryrefslogtreecommitdiff
path: root/alot/crypto.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/crypto.py')
-rw-r--r--alot/crypto.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/crypto.py b/alot/crypto.py
index 9000d15b..97449c78 100644
--- a/alot/crypto.py
+++ b/alot/crypto.py
@@ -122,9 +122,10 @@ def get_key(keyid):
except gpgme.GpgmeError as e:
if e.code == gpgme.ERR_AMBIGUOUS_NAME:
# Deferred import to avoid a circular import dependency
- from alot.db.errors import GPGProblem
raise GPGProblem(("More than one key found matching this filter."
" Please be more specific (use a key ID like 4AC8EE1D)."))
+ elif e.code == gpgme.ERR_INV_VALUE or e.code == gpgme.ERR_EOF:
+ raise GPGProblem("Can not find key for " + keyid)
else:
raise e
return key