[Buildbot-devel] Bug in status/mail.py

Grig Gheorghiu grig at agilistas.org
Mon Jan 15 19:25:57 UTC 2007

I've been working on getting email notifications to work for the
Pybots buildbot farm (www.pybots.org) and I stumbled on a bug in
status/mail.py. I was passing an incorrect "mode" parameter to the
MailNotifier class by specifying "failure" instead of "failing".

The result of that was that mail was sent out even on success, with a
subject such as "buildbot success in x86 Ubuntu Breezy trunk", but
with a summary that was misleading: "The Buildbot has detected a new
failure of x86 Ubuntu Breezy trunk.".

This is because in the MailNotifier:buildFinished method, self.mode is
only compared against "failing" and "problem". If it is neither, it is
assumed to be "all", and the method returns self.buildMessage(name,
build, results).

So any incorrect string you pass as a mode will have the effect I
mentioned. One possible solution would be to have an 'available_modes'
list variable in the MailNotifier class and return quickly from
buildFinished if self.mode is not in self.available_modes.


More information about the devel mailing list