diff options
author | Robert Martin <rdm@google.com> | 2013-04-22 16:33:28 -0400 |
---|---|---|
committer | Robert Martin <rdm@google.com> | 2013-04-22 16:33:28 -0400 |
commit | 0c752a2cab9d10487c87fb7b7c0ffb310c987c0b (patch) | |
tree | 10b770f0145874e144736f12eec280542d93bdf1 /askbot/mail | |
parent | 2b3d3d91e30715b44db2220216c8ee4f6a3ab6d6 (diff) | |
download | askbot-0c752a2cab9d10487c87fb7b7c0ffb310c987c0b.tar.gz askbot-0c752a2cab9d10487c87fb7b7c0ffb310c987c0b.tar.bz2 askbot-0c752a2cab9d10487c87fb7b7c0ffb310c987c0b.zip |
fix bug where unicode was not marked correctly.
The bug caused an exception when Email settings were incorrect,
ironically when raise_on_failure=False.
Diffstat (limited to 'askbot/mail')
-rw-r--r-- | askbot/mail/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py index 60deec68..e5f97deb 100644 --- a/askbot/mail/__init__.py +++ b/askbot/mail/__init__.py @@ -176,7 +176,7 @@ def mail_moderators( msg.content_subtype = 'html' msg.send() except smtplib.SMTPException, error: - sys.stderr.write('\n' + error.encode('utf-8') + '\n') + sys.stderr.write('\n' + unicode(error).encode('utf-8') + '\n') if raise_on_failure == True: raise exceptions.EmailNotSent(unicode(error)) |