Commit 59b65a53 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

MailTemplates py3

parent 0d8a1d17
......@@ -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