summaryrefslogtreecommitdiff
path: root/alot/commands/envelope.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-08-16 11:37:31 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-08-19 12:52:26 -0700
commitdee41bb04906d6976b4f7c05c222f7d95182b3ea (patch)
tree2dbe16e47e3b8fee167d9375e83bd42585e78464 /alot/commands/envelope.py
parent188d79a0189b480656542a09be348fcbf506f33d (diff)
Replace Exception.message with str(Exception)
In python3 Exception doesn't have a message attribute, the only way to get the string output is to call str() on the Exception. This also works in python 2.7, so go ahead and make that change.
Diffstat (limited to 'alot/commands/envelope.py')
-rw-r--r--alot/commands/envelope.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index b9ff51d6..4d2963ee 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -146,8 +146,8 @@ class SaveCommand(Command):
ui.apply_command(globals.FlushCommand())
ui.apply_command(commands.globals.BufferCloseCommand())
except DatabaseError as e:
- logging.error(e.message)
- ui.notify('could not index message:\n%s' % e.message,
+ logging.error(e)
+ ui.notify('could not index message:\n%s' % e,
priority='error',
block=True)
else:
@@ -217,7 +217,7 @@ class SendCommand(Command):
self.mail = email_as_string(self.mail)
except GPGProblem as e:
ui.clear_notify([clearme])
- ui.notify(e.message, priority='error')
+ ui.notify(str(e), priority='error')
return
ui.clear_notify([clearme])
@@ -499,7 +499,7 @@ class SignCommand(Command):
sign=True)
except GPGProblem as e:
envelope.sign = False
- ui.notify(e.message, priority='error')
+ ui.notify(str(e), priority='error')
return
else:
try:
@@ -571,7 +571,7 @@ class EncryptCommand(Command):
tmp_key = crypto.get_key(keyid)
del envelope.encrypt_keys[tmp_key.fpr]
except GPGProblem as e:
- ui.notify(e.message, priority='error')
+ ui.notify(str(e), priority='error')
if not envelope.encrypt_keys:
envelope.encrypt = False
ui.current_buffer.rebuild()