Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: scripts/master/exception_notifier.py

Issue 720273003: ExceptionNotifier: a new MailNotifier which treats exceptions as failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Addressed comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/master/unittests/exception_notifier_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """A fixed version of MailNotifier which treats exception as failure."""
6
7 from buildbot.status import mail
8 from buildbot.status.results import FAILURE, EXCEPTION
9
10 class ExceptionNotifier(mail.MailNotifier):
11 """Same as MailNotifier that treats EXCEPTION as failure."""
12 def isMailNeeded(self, build, results):
13 builder = build.getBuilder()
14 if self.builders is not None and builder.name not in self.builders:
15 return False
16 if self.categories is not None and builder.category not in self.categories:
17 return False
18 if self.mode == 'failing' and results in [FAILURE, EXCEPTION]:
19 return True
20 return mail.MailNotifier.isMailNeeded(self, build, results)
OLDNEW
« no previous file with comments | « no previous file | scripts/master/unittests/exception_notifier_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698