Commit 7a9aa564 authored by Nick Mathewson's avatar Nick Mathewson 🎨
Browse files

r17511@catbus: nickm | 2008-01-07 15:26:09 -0500

 Send a "no bridges" email rather than no email when no bridges are available.

parent 2ae45a65
......@@ -180,9 +180,6 @@ def getMailResponse(lines, ctx):"Got a mail from a bad email address %r: %s.",
clientAddr, e)
return None, None
if not bridges:
logging.warning("No bridges available to send to %r", clientAddr)
return None, None
# Generate the message.
f = StringIO()
......@@ -197,7 +194,10 @@ def getMailResponse(lines, ctx):
w.addheader("Date", twisted.mail.smtp.rfc822date())
body = w.startbody("text/plain")
answer = "".join(" %s\n" % b.getConfigLine() for b in bridges)
if bridges:
answer = "".join(" %s\n" % b.getConfigLine() for b in bridges)
answer = "(no bridges currently available)"
body.write(EMAIL_MESSAGE_TEMPLATE % answer)
Supports Markdown
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