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

Unified Diff: gclient.py

Issue 3104036: Cleanup the code in gclient_utils to standardize on CheckCall nomenclature. (Closed)
Patch Set: Rewrote the patch in part as I had introduced regressions. Removed a lot of dead code Created 10 years, 4 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 | « gcl.py ('k') | gclient_scm.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 778e52f373a0655c6c35699fe9e56a31b773184e..5ca7036357d05d77fa594638cfda2a0491f285b2 100644
--- a/gclient.py
+++ b/gclient.py
@@ -448,11 +448,15 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem):
splice_index = command.index('$matching_files')
command[splice_index:splice_index + 1] = matching_file_list
- # Use a discrete exit status code of 2 to indicate that a hook action
- # failed. Users of this script may wish to treat hook action failures
- # differently from VC failures.
- return gclient_utils.SubprocessCall(command, cwd=self.root_dir(),
- fail_status=2)
+ try:
+ gclient_utils.CheckCallAndFilterAndHeader(
+ command, cwd=self.root_dir(), always=True)
+ except gclient_utils.Error, e:
+ # Use a discrete exit status code of 2 to indicate that a hook action
+ # failed. Users of this script may wish to treat hook action failures
+ # differently from VC failures.
+ print >> sys.stderr, 'Error: %s' % str(e)
+ sys.exit(2)
def root_dir(self):
return self.parent.root_dir()
« no previous file with comments | « gcl.py ('k') | gclient_scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698