summaryrefslogtreecommitdiff
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-11 14:36:32 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-11 14:36:32 (GMT)
commite0e64a93a67d03bef200a10417d4334198247aa4 (patch)
tree83e6c46046570e4ab1bdd56f9dfb47717cf92cff /pykolab/utils.py
parente731c861ebcb52ef33296b53f2a72099a4ae5161 (diff)
downloadpykolab-e0e64a93a67d03bef200a10417d4334198247aa4.tar.gz
The email.MIMEText class will take care of line wrapping; no need to do it twice
Diffstat (limited to 'pykolab/utils.py')
-rw-r--r--pykolab/utils.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index f91ed8d..a9537dd 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -303,11 +303,7 @@ def multiline_message(message):
return "\n%s\n" % ("\n".join(lines))
def stripped_message(message):
- lines = []
- for line in message.strip().split("\n"):
- lines.append(multiline_message(line).strip())
-
- return "\n%s\n" % ("\n".join(lines))
+ return "\n" + message.strip() + "\n"
def str2unicode(s, encoding='utf-8'):
if isinstance(s, unicode):