Commit fd98786b authored by Jérome Perrin's avatar Jérome Perrin

MailTemplates py3

parent 7a857653
......@@ -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