summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-08-03 10:21:11 -0700
committerPatrick Totzke <patricktotzke@gmail.com>2018-08-04 16:21:31 +0100
commit1240eba9cd31e81ea364cdab038685fabb7eab2e (patch)
tree1fdef1fb9de1f8d30e9530506a8cf5df1cd112a7 /alot/commands/thread.py
parent273f4143626020321b6cf15f94ff0a5ec71d642d (diff)
db/utils: Replace encode_header with Message.add_header
Which appears to be capable of doing all the same things, but is in the stdlib instead of something we hand rolled.
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r--alot/commands/thread.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 6513872c..02a801d9 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -27,7 +27,6 @@ from .common import RetagPromptCommand
from .envelope import SendCommand
from ..completion import ContactsCompleter, PathCompleter
from ..db.utils import decode_header
-from ..db.utils import encode_header
from ..db.utils import extract_headers
from ..db.utils import extract_body
from ..db.envelope import Envelope
@@ -746,8 +745,7 @@ class PipeCommand(Command):
for msg in to_print:
mail = msg.get_email()
if self.add_tags:
- mail['Tags'] = encode_header('Tags',
- ', '.join(msg.get_tags()))
+ mail.add_header('Tags', ', '.join(msg.get_tags()))
if self.output_format == 'raw':
pipestrings.append(mail.as_string())
elif self.output_format == 'decoded':