From 25710c946ee439e3eee94c3417648c873e66399a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 12 Oct 2007 05:51:13 +0000 Subject: Handle Exceptions in mod_mail_summary.finalize() and check if the server actually supports TLS, bug #183808 (trunk r7984 and r8058) svn path=/main/branches/2.1.2/; revision=8059 --- pym/elog_modules/mod_mail_summary.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pym/elog_modules') diff --git a/pym/elog_modules/mod_mail_summary.py b/pym/elog_modules/mod_mail_summary.py index d42f6453e..c89613131 100644 --- a/pym/elog_modules/mod_mail_summary.py +++ b/pym/elog_modules/mod_mail_summary.py @@ -4,6 +4,8 @@ # $Id: mod_mail.py 3484 2006-06-10 22:38:44Z genone $ import portage_mail, socket, os, time +from portage_exception import PortageException +from portage_util import writemsg from email.MIMEText import MIMEText as TextMessage _items = {} @@ -48,6 +50,9 @@ def _finalize(mysettings, items): mymessage = portage_mail.create_message(myfrom, myrecipient, mysubject, mybody, attachments=items.values()) - portage_mail.send_mail(mysettings, mymessage) + try: + portage_mail.send_mail(mysettings, mymessage) + except PortageException, e: + writemsg("%s\n" % str(e), noiselevel=-1) return -- cgit v1.2.3-1-g7c22