summaryrefslogtreecommitdiff
path: root/alot/crypto.py
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2012-05-01 13:13:42 +0200
committerMichael Stapelberg <michael@stapelberg.de>2012-05-01 13:13:42 +0200
commit2b81465a6efc3d98017f92dbdf04ffd5a3664219 (patch)
tree58d0e5a334f9bde4324e305248ec4c4486ccfb67 /alot/crypto.py
parent31a0194e1629815ab6553aca3b7bb77e8c050158 (diff)
use sphinx markup for email_as_string
Diffstat (limited to 'alot/crypto.py')
-rw-r--r--alot/crypto.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/alot/crypto.py b/alot/crypto.py
index 911e3a17..2e417060 100644
--- a/alot/crypto.py
+++ b/alot/crypto.py
@@ -8,8 +8,13 @@ import pyme.constants
def email_as_string(mail):
- # Converting inner_msg to text with as_string() mangles lines
- # beginning with "From", therefore we do it the hard way.
+ """
+ Converts the given message to a string, without mangling "From" lines
+ (like as_string() does).
+
+ :param mail: email to convert to string
+ :rtype: str
+ """
fp = StringIO()
g = Generator(fp, mangle_from_=False)
g.flatten(mail)