summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))