aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'jobs')
-rwxr-xr-xjobs/EmailChecker.py4
-rwxr-xr-xjobs/JobBase.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/jobs/EmailChecker.py b/jobs/EmailChecker.py
index 939d5b8..818600d 100755
--- a/jobs/EmailChecker.py
+++ b/jobs/EmailChecker.py
@@ -15,6 +15,10 @@ class EmailChecker(JobBase.JobBase):
def notifyOnFailureEvery(self):
return JobBase.JobFailureNotificationFrequency.EVERYTIME
def execute(self):
+ if self.config.getboolean('email', 'nomail'):
+ logging.debug("Pretending the EmailChecker job succeeded.")
+ return True
+
USER = self.config.get('email', 'user')
PASS = self.config.get('email', 'pass')
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index 09a8333..9ea31a4 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -110,6 +110,10 @@ class JobBase(object):
return True
def sendEmail(config, subject, body, to=""):
+ if config.getboolean('email', 'nomail'):
+ logging.info("Not sending email with subject '" + subject + '" but pretending we did.')
+ return True
+
FROM = config.get('email', 'user')
PASS = config.get('email', 'pass')
if not to: