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

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: use input_api.subprocess 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..a3452341d508ab06b6f275087711f3007df96151 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -10,7 +10,6 @@ for more details about the presubmit API built into gcl.
import re
-import subprocess
import sys
@@ -526,14 +525,13 @@ 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 = input_api.subprocess.Popen(args,
+ stdout=input_api.subprocess.PIPE)
+ 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