diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-08-03 10:21:11 -0700 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2018-08-04 16:21:31 +0100 |
commit | 1240eba9cd31e81ea364cdab038685fabb7eab2e (patch) | |
tree | 1fdef1fb9de1f8d30e9530506a8cf5df1cd112a7 /alot/commands/thread.py | |
parent | 273f4143626020321b6cf15f94ff0a5ec71d642d (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.py | 4 |
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': |