Commit 83e83cb8 authored by Jérome Perrin's avatar Jérome Perrin

MailTemplates py3

parent acda57c8
......@@ -51,7 +51,7 @@ class BaseMailTemplate:
# So I remove it.
if text.endswith('\n'):
text = text[:-1]
if not self.html() and isinstance(text, six.text_type):
if six.PY2 and not self.html() and isinstance(text, six.text_type):
text = text.encode(encoding,'replace')
# now turn the result into a MIMEText object
msg = MIMEText(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment