[tor-commits] [bridgedb/develop] Tweak the log message strings in EmailServer.replyToMail().
isis at torproject.org
isis at torproject.org
Mon Mar 17 05:18:10 UTC 2014
commit 5e40f67141201aa9f5561319b32069c130899160
Author: Isis Lovecruft <isis at torproject.org>
Date: Mon Mar 17 03:01:14 2014 +0000
Tweak the log message strings in EmailServer.replyToMail().
---
lib/bridgedb/EmailServer.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/bridgedb/EmailServer.py b/lib/bridgedb/EmailServer.py
index d442ccd..8fb0d8a 100644
--- a/lib/bridgedb/EmailServer.py
+++ b/lib/bridgedb/EmailServer.py
@@ -249,12 +249,15 @@ def replyToMail(lines, ctx):
:type ctx: :class:`MailContext`
:param ctx: The configured context for the email server.
"""
- logging.info("Got a completed email; deciding whether to reply.")
+ logging.info("Got an email; deciding whether to reply.")
sendToUser, response = getMailResponse(lines, ctx)
if response is None:
- logging.debug("getMailResponse said not to reply, so I won't.")
+ logging.debug("getMailResponse() said not to reply to %s, so I won't."
+ % Util.logSafely(sendToUser))
return
response.seek(0)
+ logging.info("Sending reply to %r", Util.logSafely(sendToUser))
+
d = Deferred()
factory = twisted.mail.smtp.SMTPSenderFactory(
ctx.smtpFromAddr,
@@ -262,7 +265,7 @@ def replyToMail(lines, ctx):
response,
d)
reactor.connectTCP(ctx.smtpServer, ctx.smtpPort, factory)
- logging.info("Sending reply to %r", Util.logSafely(sendToUser))
+
return d
def getLocaleFromPlusAddr(address):
More information about the tor-commits
mailing list