summaryrefslogtreecommitdiff
path: root/alot/commands/thread.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/thread.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/thread.py')
-rw-r--r--alot/commands/thread.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index acbb4e28..d73ef622 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -186,7 +186,7 @@ class ReplyCommand(Command):
try:
from_header, _ = determine_sender(mail, 'reply')
except AssertionError as e:
- ui.notify(e.message, priority='error')
+ ui.notify(str(e), priority='error')
return
envelope.add('From', from_header)
@@ -394,7 +394,7 @@ class ForwardCommand(Command):
try:
from_header, _ = determine_sender(mail, 'reply')
except AssertionError as e:
- ui.notify(e.message, priority='error')
+ ui.notify(str(e), priority='error')
return
envelope.add('From', from_header)
@@ -441,7 +441,7 @@ class BounceMailCommand(Command):
try:
resent_from_header, account = determine_sender(mail, 'bounce')
except AssertionError as e:
- ui.notify(e.message, priority='error')
+ ui.notify(str(e), priority='error')
return
mail['Resent-From'] = resent_from_header