summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorJohannes Kulick <kulick@hildensia.de>2012-12-15 15:10:55 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2013-02-19 10:10:07 +0000
commite0832db8ad35507256f8f9f01fca3f5d4e99247a (patch)
treeebd4afd9baab0107782a475c90313339ff3885e7 /alot
parent1f72f815f36cf740f996e0647fdfa85d689f55a3 (diff)
handle more error codes
sometimes if gpgme doesn't find a key it gives INVALID_VAL sometimes EOF, we now handle both
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/envelope.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 45ede761..81aeeb8e 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -519,7 +519,7 @@ class EncryptCommand(Command):
envelope.encrypt_keys.update(keys)
except gpgme.GpgmeError as e:
- if e.code == gpgme.ERR_INV_VALUE:
+ if e.code == gpgme.ERR_INV_VALUE or e.code == gpgme.ERR_EOF:
raise GPGProblem("Can not find key to encrypt.")
raise GPGProblem(str(e))