aboutsummaryrefslogtreecommitdiff
path: root/jobs/JobBase.py
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-01-26 00:35:49 -0500
committerTom Ritter <tom@ritter.vg>2016-01-26 00:35:49 -0500
commit19341244fb0a313a1743cbae9c3dc5cbbcd3ddb0 (patch)
treef78c4f5f4379b43c6cff0a26bf5b5b6403fb27f1 /jobs/JobBase.py
parent109e568f7211d910155d7cd2334fa956d769e22a (diff)
Add a server identifier to the settings file.
Diffstat (limited to 'jobs/JobBase.py')
-rwxr-xr-xjobs/JobBase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index e7b3c33..a10bdeb 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -34,11 +34,11 @@ def sendEmail(config, subject, body, to=""):
FROM = config.get('email', 'user')
PASS = config.get('email', 'pass')
if not to:
- to = config.get('alertcontact', 'default')
+ to = config.get('general', 'alertcontact')
# Prepare actual message
# Avoid gmail threading
- subject = subject + " " + str(random.random())
+ subject = "[" + config.get('general', 'servername') + "] " + subject + " " + str(random.random())
message = """\From: %s\nTo: %s\nSubject: %s\n\n%s""" \
% (FROM, ", ".join(to), subject, body)
try: