Using variable on isMailNeeded

This commit is contained in:
Sergio Durigan Junior 2016-07-23 09:10:41 -04:00
parent 8dafb917d8
commit 3033de6583

View file

@ -405,9 +405,10 @@ class MyMailNotifier (mail.MailNotifier):
"""Extend the regular MailNotifier class in order to filter e-mails by """Extend the regular MailNotifier class in order to filter e-mails by
scheduler.""" scheduler."""
def isMailNeeded (self, build, results): def isMailNeeded (self, build, results):
if build.properties.getProperty ('scheduler').startswith ('racy'): prop = build.properties.getProperty ('scheduler')
if prop.startswith ('racy'):
return False return False
elif build.properties.getProperty ('scheduler').startswith ('try'): elif prop.startswith ('try'):
if not self.sendToInterestedUsers: if not self.sendToInterestedUsers:
# This means we're dealing with mn. We only send # This means we're dealing with mn. We only send
# e-mail on mn_try. # e-mail on mn_try.