aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-01-25 22:34:02 -0500
committerTom Ritter <tom@ritter.vg>2016-01-25 22:34:02 -0500
commit65e71a10d23a70cd9dfdd6922b87802ad72f4eac (patch)
treedf2ddc9af8b5996d1a967c77dcc7d98ae5690ee7 /jobs
parentce9a2f32ead355fdf166efeb3f8fc264fd428feb (diff)
Log an exception if we can't send email.
Diffstat (limited to 'jobs')
-rwxr-xr-xjobs/JobBase.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index 330b6a9..e7b3c33 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -49,5 +49,6 @@ def sendEmail(config, subject, body, to=""):
server.sendmail(FROM, to, message)
server.close()
return True
- except:
- return False \ No newline at end of file
+ except Exception as e:
+ logging.critical("Caught an exception trying to send an email:" + str(e))
+ return False