summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2014-03-21 15:59:03 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2014-03-21 15:59:03 +0000
commit8cc38a0f605b482f9de51685d477a644ee1a2573 (patch)
tree1cb9949c4b3397c5a6ef9dae55f4033eacebd52e
parentee0a7db57c2734655746b1e5d3eac83b42f632f3 (diff)
always return new Envelope in helper.mailto_to_envelope
-rw-r--r--alot/helper.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/alot/helper.py b/alot/helper.py
index b5dcc14c..6eceeed9 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -464,7 +464,7 @@ def mimewrap(path, filename=None, ctype=None):
content = open(path, 'rb').read()
if not ctype:
ctype = guess_mimetype(content)
- # libmagic < 5.12 incorrectly detects excel/powerpoint files as
+ # libmagic < 5.12 incorrectly detects excel/powerpoint files as
# 'application/msword' (see #179 and #186 in libmagic bugtracker)
# This is a workaround, based on file extension, useful as long
# as distributions still ship libmagic 5.11.
@@ -588,6 +588,4 @@ def mailto_to_envelope(mailto_str):
"""
from alot.db.envelope import Envelope
headers, body = parse_mailto(mailto_str)
- if headers is not None:
- return Envelope(bodytext=body, headers=headers)
- return None
+ return Envelope(bodytext=body, headers=headers)