summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjobs/JobBase.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index 8763126..4d01ac6 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -143,7 +143,7 @@ class JobBase(object):
log.warn(self.getName() + " did not override onStateChangeSuccess")
return True
-def sendEmail(config, subject, body, to=""):
+def sendEmail(config, subject, body, to=None):
if config.getboolean('email', 'nomail'):
logging.info("Not sending email with subject '" + subject + '" but pretending we did.\n' + body)
return True
@@ -154,6 +154,8 @@ def sendEmail(config, subject, body, to=""):
if not to:
to = config.get('general', 'alertcontact')
+ if not isinstance(to, list):
+ to = [to]
# Prepare actual message
# Avoid gmail threading