aboutsummaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2005-08-11 17:38:44 +0000
committerMarius Mauch <genone@gentoo.org>2005-08-11 17:38:44 +0000
commit9455c20172054f2e9c0541e403e0ddd0adea4aff (patch)
tree0dd270a555f60b578585119f69ef02a403876887 /pym
parentclean up syntax and quoting and such (diff)
downloadportage-cvs-9455c20172054f2e9c0541e403e0ddd0adea4aff.tar.gz
portage-cvs-9455c20172054f2e9c0541e403e0ddd0adea4aff.tar.bz2
portage-cvs-9455c20172054f2e9c0541e403e0ddd0adea4aff.zip
minor bugfixes for exception handler
Diffstat (limited to 'pym')
-rw-r--r--pym/elog_modules/mod_mail.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/elog_modules/mod_mail.py b/pym/elog_modules/mod_mail.py
index 9528e30..397405b 100644
--- a/pym/elog_modules/mod_mail.py
+++ b/pym/elog_modules/mod_mail.py
@@ -1,4 +1,4 @@
-import smtplib, email.Message, socket
+import smtplib, email.Message, socket, portage_exception
def process(mysettings, cpv, logentries, fulltext):
mymailhost = "localhost"
@@ -48,7 +48,7 @@ def process(mysettings, cpv, logentries, fulltext):
myconn.sendmail("portage", myrecipient, mymessage.as_string())
myconn.quit()
except smtplib.SMTPException, e:
- raise portage_exception.PortageException("!!! An error occured while trying to send logmail:\n"+e)
+ raise portage_exception.PortageException("!!! An error occured while trying to send logmail:\n"+str(e))
except socket.error, e:
- raise portage_exception.PortageException("!!! A network error occured while trying to send logmail:\n"+e+"\nSure you configured PORTAGE_LOG_MAILURI correctly?")
+ raise portage_exception.PortageException("!!! A network error occured while trying to send logmail:\n"+str(e)+"\nSure you configured PORTAGE_LOG_MAILURI correctly?")
return