From e82ea9d8b27d3fc7e8b74359acf506519df6648c Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 13 Dec 2009 19:58:34 +0000 Subject: [PATCH] Fix some errors + better formatting for the custom email message. Also set it to only report problems and not successful builds. Originally committed to SVN as r3867. --- devel/tinderbox/buildbot/master/master.cfg | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/devel/tinderbox/buildbot/master/master.cfg b/devel/tinderbox/buildbot/master/master.cfg index ea803964e..093fb1f2c 100644 --- a/devel/tinderbox/buildbot/master/master.cfg +++ b/devel/tinderbox/buildbot/master/master.cfg @@ -749,6 +749,7 @@ c['status'].append(html.WebStatus(http_port="tcp:8001:interface=127.0.0.1", allo # Send out status emails. from buildbot.status import mail from buildbot.status.builder import Results +from datetime import datetime def message(attrs): text = list() @@ -768,14 +769,16 @@ def message(attrs): for change in attrs['changes']: text.append(" Committer : %s" % change.who) - text.append(" Revision : %s http://devel.aegisub.org/changeset/$s" % (change.revision, change.revision)) - text.append(" Changeset : http://devel.aegisub.org/changeset/$s" % change.revision) - text.append(" Time : %s" % change.when) + text.append(" Revision : %s" % change.revision) + text.append(" Changeset : http://devel.aegisub.org/changeset/%s" % change.revision) + text.append(" Time : %s" % datetime.fromtimestamp(change.when).strftime("%Y-%m-%d %H:%M:%S")) text.append("") text.append(" Files") for file in change.files: text.append(" %s" % file) - text.append("Log:\n%s" % change.comments) + text.append(" Log:\n%s" % ' ' + change.comments.replace("\n", "\n ")) + text.append("") + text.append("---------------------------------------------------------------") text.append("") text.append("") @@ -786,7 +789,7 @@ c['status'].append(mail.MailNotifier(fromaddr="tinderbox@aegisub.org", extraRecipients=["aegisub-tinderbox@aegisub.org"], sendToInterestedUsers=False, customMesg=message, - mode="all", + mode="problem", extraHeaders={'Reply-To':'aegisub-tinderbox@aegisub.org'})) # IRC!