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

Unified Diff: PRESUBMIT.py

Issue 1395493002: Improve error messages from checkperms PRESUBMIT check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | third_party/WebKit/PRESUBMIT.py » ('j') | 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 df38b007146b6f30ea723bbe1e02a13ecd334abd..b08514e9ce0e864326e3841d06ceca985f062cdd 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -656,13 +656,13 @@ def _CheckFilePermissions(input_api, output_api):
'--root', input_api.change.RepositoryRoot()]
for f in input_api.AffectedFiles():
args += ['--file', f.LocalPath()]
- checkperms = input_api.subprocess.Popen(args,
- stdout=input_api.subprocess.PIPE)
- errors = checkperms.communicate()[0].strip()
- if errors:
- return [output_api.PresubmitError('checkperms.py failed.',
- errors.splitlines())]
- return []
+ try:
+ input_api.subprocess.check_output(args)
+ return []
+ except input_api.subprocess.CalledProcessError as error:
+ return [output_api.PresubmitError(
+ 'checkperms.py failed:',
+ long_text=error.output)]
def _CheckNoAuraWindowPropertyHInHeaders(input_api, output_api):
« no previous file with comments | « no previous file | third_party/WebKit/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698