Prevent email_manager from hiding exceptions when sending email fails.
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3674 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/email_manager.py b/scheduler/email_manager.py
index 6ce627a..66b1c69 100644
--- a/scheduler/email_manager.py
+++ b/scheduler/email_manager.py
@@ -33,7 +33,10 @@
try:
mailer.sendmail(self._from_address, to_list, msg)
finally:
- mailer.quit()
+ try:
+ mailer.quit()
+ except:
+ logging.exception('mailer.quit() failed:')
except Exception:
logging.exception('Sending email failed:')