Chromium Code Reviews| Index: presubmit_support.py |
| diff --git a/presubmit_support.py b/presubmit_support.py |
| index a62948d9fafbc39fdcfdb832fe6d7b01de73cb9f..3af5edd87a54a806043687620a970f1d93652a20 100755 |
| --- a/presubmit_support.py |
| +++ b/presubmit_support.py |
| @@ -154,12 +154,19 @@ class OutputApi(object): |
| """Whether this presubmit result should result in a prompt warning.""" |
| return False |
| + def IsMessage(self): |
|
M-A Ruel
2011/03/10 13:41:44
I'm wondering;
this should have all been properti
|
| + """Whether this result contains anything needing to be displayed.""" |
| + return True |
| + |
| class PresubmitAddText(PresubmitResult): |
| """Propagates a line of text back to the caller.""" |
| def __init__(self, message, items=None, long_text=''): |
| super(OutputApi.PresubmitAddText, self).__init__("ADD: " + message, |
| items, long_text) |
| + def IsMessage(self): |
| + return False |
| + |
| class PresubmitError(PresubmitResult): |
| """A hard presubmit error.""" |
| def IsFatal(self): |
| @@ -1056,6 +1063,9 @@ def DoPresubmitChecks(change, |
| if items: |
| output_stream.write('** Presubmit %s **\n' % name) |
| for item in items: |
| + if not item.IsMessage(): |
| + continue |
| + |
| # Access to a protected member XXX of a client class |
| # pylint: disable=W0212 |
| if not item._Handle(output_stream, input_stream, |