[Buildbot-devel] patch for review: mail.MailNotifier support for 'passing' mode?

Matisse Enzer matisse at matisse.net
Sun Jan 13 18:27:36 UTC 2008


I wanted to send email with a different Subject line for passing  
builds, so I made the following changes to buildbot/status/mail.py

This supports a new MailNotifer mode of 'passing'

I wonder what you all think of this:


--- /usr/lib/python2.4/site-packages/buildbot/status/mail.py.dist	 
2008-01-13 09:21:23.000000000 -0800
+++ /usr/lib/python2.4/site-packages/buildbot/status/mail.py	 
2008-01-13 10:23:04.000000000 -0800
@@ -208,6 +208,8 @@

          if self.mode == "failing" and results != FAILURE:
              return
+        if self.mode == "passing" and results == SUCCESS:
+            return
          if self.mode == "problem":
              if results != FAILURE:
                  return
@@ -228,6 +230,8 @@
              text += "The Buildbot has finished a build of %s.\n" %  
name
          elif self.mode == "failing":
              text += "The Buildbot has detected a failed build of %s. 
\n" % name
+        elif self.mode == "passing":
+            text += "The Buildbot has detected a passing build of %s. 
\n" % name
          else:
              text += "The Buildbot has detected a new failure of %s. 
\n" % name
          buildurl = self.status.getURLForThing(build)








More information about the devel mailing list