diff options
author | Johannes Kulick <kulick@hildensia.de> | 2012-12-18 11:30:08 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2013-02-19 10:10:08 +0000 |
commit | edf87f1ea8d3a3a76235649b852f9486ddd76726 (patch) | |
tree | 43ac7634dd71f14b913f82b26e525bdbb27a887c /alot/crypto.py | |
parent | b9a57a6f9840fe16c920148eae4451997abdde64 (diff) |
better error messages
also the error catchings are mostly moved to crypto.py whcih makes everything
else a little bit cleaner
Diffstat (limited to 'alot/crypto.py')
-rw-r--r-- | alot/crypto.py | 3 |
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 |