Skip to content

Commit

Permalink
Python3 support - change unicode to str
Browse files Browse the repository at this point in the history
  • Loading branch information
emi committed Feb 12, 2019
1 parent e440ab6 commit bb3641d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions emailtemplates/email.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8
import os
import logging
import six
from smtplib import SMTPException

from django.conf import settings
Expand Down Expand Up @@ -96,8 +97,8 @@ def get_object(self):
"Can't convert to unicode EmailTemplate object from database, using default file template.")
break
else:
self.template = unicode(tmp.content)
self.subject = unicode(tmp.subject) or self.subject
self.template = str(tmp.content)
self.subject = str(tmp.subject) or self.subject
self._template_source = 'database'
logger.debug(u"Got template %s from database", self.name)
return
Expand Down

0 comments on commit bb3641d

Please sign in to comment.