[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r21208: {projects} Only send out notifications if we got valid addresses (projects/gettor)
Author: kaner
Date: 2009-12-14 19:02:53 -0500 (Mon, 14 Dec 2009)
New Revision: 21208
Modified:
projects/gettor/GetTor.py
Log:
Only send out notifications if we got valid addresses
Modified: projects/gettor/GetTor.py
===================================================================
--- projects/gettor/GetTor.py 2009-12-14 23:52:00 UTC (rev 21207)
+++ projects/gettor/GetTor.py 2009-12-15 00:02:53 UTC (rev 21208)
@@ -32,10 +32,11 @@
log.info("We'll keep a record of this mail.")
gettor.utils.dumpMessage(conf, rawMessage)
# Send out notification to user, if possible
- if not gettor.responses.sendNotification(conf, sendFr, sendTo):
- log.error("Also failed to send the user a proper notification. :-/")
- else:
- log.info("Failure notification sent to user %s" % sendTo)
+ if sendFr != "" and sendTo != "":
+ if not gettor.responses.sendNotification(conf, sendFr, sendTo):
+ log.error("Also failed to send the user a proper notification. :-/")
+ else:
+ log.info("Failure notification sent to user %s" % sendTo)
def processMail(conf):
"""All mail processing happens here. Processing goes as follows:
@@ -48,6 +49,8 @@
rawMessage = ""
replyTo = ""
+ sendFr = ""
+ replyTo = ""
log.info("Processing mail..")
# Retrieve request from stdin
try: