aboutsummaryrefslogtreecommitdiff
path: root/jobs/JobBase.py
diff options
context:
space:
mode:
authorTom <tom@ritter.vg>2016-09-14 11:59:16 -0500
committerTom <tom@ritter.vg>2016-09-14 11:59:16 -0500
commit4426633a8120926f05ee8818c22d962f76f99a69 (patch)
treea442c837ad2689ef1e53f9bffc23095256704fb0 /jobs/JobBase.py
parent407bcc112e1a0eabe8c35076210519eed9607804 (diff)
Add a new nomail commandline option for debugging
Diffstat (limited to 'jobs/JobBase.py')
-rwxr-xr-xjobs/JobBase.py4
1 files changed, 4 insertions, 0 deletions
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: