Commit 3b870c5d authored by Jérome Perrin's avatar Jérome Perrin

MailTemplates py3

parent a97c006b
...@@ -51,7 +51,7 @@ class BaseMailTemplate: ...@@ -51,7 +51,7 @@ class BaseMailTemplate:
# So I remove it. # So I remove it.
if text.endswith('\n'): if text.endswith('\n'):
text = text[:-1] 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') text = text.encode(encoding,'replace')
# now turn the result into a MIMEText object # now turn the result into a MIMEText object
msg = MIMEText( 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