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

Unified Diff: PRESUBMIT.py

Issue 143013004: Fix _CheckFilePermissions to actually flag presubmit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Again Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 4a7e384c3c01d52dd7e491b17192ec1ec8e0bd62..e0e104005f94da26a315017ae63e3061998b0578 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -526,14 +526,12 @@ def _CheckFilePermissions(input_api, output_api):
input_api.change.RepositoryRoot()]
for f in input_api.AffectedFiles():
args += ['--file', f.LocalPath()]
- errors = []
- (errors, stderrdata) = subprocess.Popen(args).communicate()
-
- results = []
+ checkperms = subprocess.Popen(args, stdout=subprocess.PIPE)
M-A Ruel 2014/01/29 21:28:19 What you want is errors = input_api.subprocess.che
adamk 2014/01/29 21:39:54 Not sure what you mean by "normally", but it retur
M-A Ruel 2014/01/29 21:47:05 Normally would be in absence of catastrophic failu
adamk 2014/01/29 21:52:54 Ok, will do, but note that I didn't add this refer
+ errors = checkperms.communicate()[0].strip()
if errors:
- results.append(output_api.PresubmitError('checkperms.py failed.',
- errors))
- return results
+ return [output_api.PresubmitError('checkperms.py failed.',
+ errors.splitlines())]
+ return []
def _CheckNoAuraWindowPropertyHInHeaders(input_api, output_api):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698