summaryrefslogtreecommitdiffstats
path: root/askbot/mail
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-11-07 20:10:52 -0300
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-11-07 20:10:52 -0300
commitf91d1cd5d15270cc80d8ce391b53e2d2c91d2b0d (patch)
tree88d7f79a822cbffd842db3efd6b5ef918b423abd /askbot/mail
parent2941099084e1defdfc04606242727e7ab4d5a29e (diff)
downloadaskbot-f91d1cd5d15270cc80d8ce391b53e2d2c91d2b0d.tar.gz
askbot-f91d1cd5d15270cc80d8ce391b53e2d2c91d2b0d.tar.bz2
askbot-f91d1cd5d15270cc80d8ce391b53e2d2c91d2b0d.zip
removed logging statements from the lamson handlers
Diffstat (limited to 'askbot/mail')
-rw-r--r--askbot/mail/__init__.py6
-rw-r--r--askbot/mail/parsing.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py
index d94c1a5f..066f133a 100644
--- a/askbot/mail/__init__.py
+++ b/askbot/mail/__init__.py
@@ -1,10 +1,10 @@
"""functions that send email in askbot
these automatically catch email-related exceptions
"""
-import logging
import os
import re
import smtplib
+import sys
from askbot import exceptions
from askbot import const
from askbot.conf import settings as askbot_settings
@@ -135,7 +135,7 @@ def send_mail(
if related_object is not None:
assert(activity_type is not None)
except Exception, error:
- logging.critical(unicode(error))
+ sys.stderr.write('\n' + error.encode('utf-8') + '\n')
if raise_on_failure == True:
raise exceptions.EmailNotSent(unicode(error))
@@ -172,7 +172,7 @@ def mail_moderators(
msg.content_subtype = 'html'
msg.send()
except smtplib.SMTPException, error:
- logging.critical(unicode(error))
+ sys.stderr.write('\n' + error.encode('utf-8') + '\n')
if raise_on_failure == True:
raise exceptions.EmailNotSent(unicode(error))
diff --git a/askbot/mail/parsing.py b/askbot/mail/parsing.py
index f856067c..4472a22e 100644
--- a/askbot/mail/parsing.py
+++ b/askbot/mail/parsing.py
@@ -56,8 +56,8 @@ def strip_email_client_quote_separator(text):
if regex.search(text):
return regex.sub('', text)
#did not find a quote separator!!! log it
- log_message = 'no matching quote separator: %s\n' % text
- sys.stdout.write(log_message.encode('utf-8'))
+ log_message = u'\nno matching quote separator: %s\n' % text
+ sys.err.write(log_message.encode('utf-8'))
return text[:-2]#strip two lines, only guessing here
def extract_reply_contents(text, reply_separator=None):