diff options
author | Tom Ritter <tom@ritter.vg> | 2016-01-25 22:34:02 -0500 |
---|---|---|
committer | Tom Ritter <tom@ritter.vg> | 2016-01-25 22:34:02 -0500 |
commit | 65e71a10d23a70cd9dfdd6922b87802ad72f4eac (patch) | |
tree | df2ddc9af8b5996d1a967c77dcc7d98ae5690ee7 /jobs/JobBase.py | |
parent | ce9a2f32ead355fdf166efeb3f8fc264fd428feb (diff) |
Log an exception if we can't send email.
Diffstat (limited to 'jobs/JobBase.py')
-rwxr-xr-x | jobs/JobBase.py | 5 |
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 |