From e0832db8ad35507256f8f9f01fca3f5d4e99247a Mon Sep 17 00:00:00 2001 From: Johannes Kulick Date: Sat, 15 Dec 2012 15:10:55 +0100 Subject: handle more error codes sometimes if gpgme doesn't find a key it gives INVALID_VAL sometimes EOF, we now handle both --- alot/commands/envelope.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alot') 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)) -- cgit v1.2.3