diff options
author | Johannes Kulick <kulick@hildensia.de> | 2012-12-19 11:54:56 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2013-02-19 10:10:08 +0000 |
commit | 9b8b8f5a68270912ac0dc8f16d320729b25d2da8 (patch) | |
tree | 89389307a1afa881c782e5202181c700e1a78fcf /alot/commands | |
parent | 591bd897f5473d7ad97f7b2ad37df1aac50386c9 (diff) |
add error codes
to avoid import ui stuff to crypto.py I added error codes to the GPGProblem
Exceptions. This way I can process them later, depending on the error code
Diffstat (limited to 'alot/commands')
-rw-r--r-- | alot/commands/envelope.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index 4c3f1e5f..a4a978f4 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -12,7 +12,7 @@ from twisted.internet.defer import inlineCallbacks import datetime from alot.account import SendingMailFailed, StoreMailError -from alot.errors import GPGProblem +from alot.errors import GPGProblem, GPGCode from alot import buffers from alot import commands from alot import crypto @@ -484,7 +484,7 @@ class EncryptCommand(Command): for keyid in self.encrypt_keys: tmp_key = crypto.get_key(keyid) del envelope.encrypt_keys[crypto.hash_key(tmp_key)] - except gpgme.GpgmeError as e: + except GPGProblem as e: ui.notify(e.message, priority='error') if not envelope.encrypt_keys: envelope.encrypt = False |