summaryrefslogtreecommitdiff
path: root/alot/commands
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-03-04 22:18:15 +0100
committerAnton Khirnov <anton@khirnov.net>2020-03-04 22:18:15 +0100
commitd98af2606e888f4c09c1deb13c6276556d896af5 (patch)
treeb4c0ed5966308d20131e5505f20cee2f08ca1518 /alot/commands
parent238be3bafed5c9f4aa8015c85ffe429fb698443a (diff)
db/utils: drop extract_headers()
It is used in only one place and does something so extremely simple it does not need to be a special imported function.
Diffstat (limited to 'alot/commands')
-rw-r--r--alot/commands/thread.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 0e306eef..c1e5b491 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -27,7 +27,6 @@ from .envelope import SendCommand
from ..completion.contacts import ContactsCompleter
from ..completion.path import PathCompleter
from ..db.utils import formataddr
-from ..db.utils import extract_headers
from ..db.utils import extract_body
from ..db.utils import clear_my_address
from ..db.utils import ensure_unique_address
@@ -677,7 +676,7 @@ class PipeCommand(Command):
if self.output_format == 'raw':
pipestrings.append(mail.as_string())
elif self.output_format == 'decoded':
- headertext = extract_headers(mail)
+ headertext = '\n'.join([key + ': ' + val for key, val in msg.headers.items()])
bodytext = extract_body(mail)
msgtext = '%s\n\n%s' % (headertext, bodytext)
pipestrings.append(msgtext)