From 7cb8fb941f09d1ac646be334745f90e16ebd46eb Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 20 Sep 2009 10:57:44 +0000 Subject: Update syntax of 'except' statements for compatibility with Python 3. (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289 --- pym/portage/mail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym/portage/mail.py') diff --git a/pym/portage/mail.py b/pym/portage/mail.py index 260455739..a8b384969 100644 --- a/pym/portage/mail.py +++ b/pym/portage/mail.py @@ -126,9 +126,9 @@ def send_mail(mysettings, message): myconn.login(mymailuser, mymailpasswd) myconn.sendmail(myfrom, myrecipient, message.as_string()) myconn.quit() - except smtplib.SMTPException, e: + except smtplib.SMTPException as e: raise portage.exception.PortageException(_("!!! An error occured while trying to send logmail:\n")+str(e)) - except socket.error, e: + except socket.error as e: raise portage.exception.PortageException(_("!!! A network error occured while trying to send logmail:\n%s\nSure you configured PORTAGE_ELOG_MAILURI correctly?") % str(e)) return -- cgit v1.2.3-1-g7c22