summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
diff options
context:
space:
mode:
authorYann Rouillard <yann@pleiades.fr.eu.org>2013-12-08 17:40:33 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2014-08-02 17:29:33 +0200
commit1912b7cdedc3ffb88ba953e4e8877fdec6c38893 (patch)
treed80fc9c459d25ddfc57735a49d80cb0951908c4a /alot/commands/thread.py
parent6e1990f019fee1cf01af1c63e6f18607da672296 (diff)
Move email_as_string function from crypto to helper module
The email_as_string function, and the related RFC3156_canonicalize function, are now used by the ForwardCommand and are not specific anymore to the crypto routine. So we move them to the global helper module. fix an import removal mistake while moving email_as_string function: StringIO was not only used by email_as_string
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r--alot/commands/thread.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 04fadeeb..ca73c75f 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -21,7 +21,6 @@ from alot.commands.globals import MoveCommand
from alot.commands.globals import CommandCanceled
from alot.commands.envelope import SendCommand
from alot import completion
-from alot import crypto
from alot.db.utils import decode_header
from alot.db.utils import encode_header
from alot.db.utils import extract_headers
@@ -32,6 +31,7 @@ from alot.db.errors import DatabaseROError
from alot.settings import settings
from alot.helper import parse_mailcap_nametemplate
from alot.helper import split_commandstring
+from alot.helper import email_as_string
from alot.utils.booleanaction import BooleanAction
from alot.completion import ContactsCompleter
@@ -315,7 +315,7 @@ class ForwardCommand(Command):
original_mail = Message()
original_mail.set_type('message/rfc822')
original_mail['Content-Disposition'] = 'attachment'
- original_mail.set_payload(crypto.email_as_string(mail))
+ original_mail.set_payload(email_as_string(mail))
envelope.attach(Attachment(original_mail))
# copy subject