[Buildbot-commits] buildbot/buildbot/status mail.py,1.32,1.33

Brian Warner warner at users.sourceforge.net
Sat Apr 14 23:41:03 UTC 2007


Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15280/buildbot/status

Modified Files:
	mail.py 
Log Message:
[project @ MailNotifier: add the project name to the subject line and message body. Thanks to Benoit Sigoure for the patch.]

Original author: warner at lothar.com
Date: 2007-04-14 02:15:57

Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- mail.py	5 Feb 2007 18:47:22 -0000	1.32
+++ mail.py	14 Apr 2007 23:41:01 -0000	1.33
@@ -61,7 +61,7 @@
 
     def __init__(self, fromaddr, mode="all", categories=None, builders=None,
                  addLogs=False, relayhost="localhost",
-                 subject="buildbot %(result)s in %(builder)s",
+                 subject="buildbot %(result)s in %(projectName)s on %(builder)s",
                  lookup=None, extraRecipients=[],
                  sendToInterestedUsers=True):
         """
@@ -214,13 +214,15 @@
         return self.buildMessage(name, build, results)
 
     def buildMessage(self, name, build, results):
+        projectName = self.status.getProjectName()
         text = ""
         if self.mode == "all":
-            text += "The Buildbot has finished a build of %s.\n" % name
+            text += "The Buildbot has finished a build"
         elif self.mode == "failing":
-            text += "The Buildbot has detected a failed build of %s.\n" % name
+            text += "The Buildbot has detected a failed build"
         else:
-            text += "The Buildbot has detected a new failure of %s.\n" % name
+            text += "The Buildbot has detected a new failure"
+        text += " of %s on %s.\n" % (name, projectName)
         buildurl = self.status.getURLForThing(build)
         if buildurl:
             text += "Full details are available at:\n %s\n" % buildurl
@@ -304,6 +306,7 @@
 
         m['Date'] = formatdate(localtime=True)
         m['Subject'] = self.subject % { 'result': res,
+                                        'projectName': projectName,
                                         'builder': name,
                                         }
         m['From'] = self.fromaddr





More information about the Commits mailing list