Author: arekm Date: Mon Dec 24 09:56:09 2007 GMT Module: pld-builder.new Tag: HEAD ---- Log message: Handle I/O failure in email sending.
---- Files affected: pld-builder.new/PLD_Builder: mailer.py (1.20 -> 1.21) ---- Diffs: ================================================================ Index: pld-builder.new/PLD_Builder/mailer.py diff -u pld-builder.new/PLD_Builder/mailer.py:1.20 pld-builder.new/PLD_Builder/mailer.py:1.21 --- pld-builder.new/PLD_Builder/mailer.py:1.20 Sun Apr 1 12:47:40 2007 +++ pld-builder.new/PLD_Builder/mailer.py Mon Dec 24 10:56:04 2007 @@ -78,5 +78,10 @@ return False send_sendmail = "/usr/sbin/sendmail -i -t -f %s" % config.admin_email f = os.popen(send_sendmail, "w") - self.write_to(f) + try: + self.write_to(f) + except IOError, e: + log.alert("sending email message failed: %s" % e) + f.close() + return False return f.close() ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/mailer.py?r1=1.20&r2=1.21&f=u _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit