| Index: presubmit_canned_checks.py
|
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
|
| index 09439fb8833e5dc2d70db3f1796a7fd7dd706bcd..ba8c3ed3dc8f2fe5c7a9fe735226ee9243777e9a 100755
|
| --- a/presubmit_canned_checks.py
|
| +++ b/presubmit_canned_checks.py
|
| @@ -74,7 +74,7 @@ def CheckChangeHasNoTabs(input_api, output_api):
|
| """
|
| for f, line_num, line in input_api.RightHandSideLines():
|
| if '\t' in line:
|
| - return [output_api.PresubmitError(
|
| + return [output_api.PresubmitPromptWarning(
|
| "Found a tab character in %s, line %s" %
|
| (f.LocalPath(), line_num))]
|
| return []
|
| @@ -103,14 +103,15 @@ def CheckLongLines(input_api, output_api, maxlen=80):
|
| def CheckTreeIsOpen(input_api, output_api, url, closed):
|
| """Checks that an url's content doesn't match a regexp that would mean that
|
| the tree is closed."""
|
| + assert(input_api.is_committing)
|
| try:
|
| connection = input_api.urllib2.urlopen(url)
|
| status = connection.read()
|
| connection.close()
|
| if input_api.re.match(closed, status):
|
| long_text = status + '\n' + url
|
| - return [output_api.PresubmitError("The tree is closed.",
|
| - long_text=long_text)]
|
| + return [output_api.PresubmitPromptWarning("The tree is closed.",
|
| + long_text=long_text)]
|
| except IOError:
|
| pass
|
| return []
|
|
|