From 4426633a8120926f05ee8818c22d962f76f99a69 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 14 Sep 2016 11:59:16 -0500 Subject: Add a new nomail commandline option for debugging --- jobs/JobBase.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'jobs/JobBase.py') 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: -- cgit v1.2.3