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

Unified Diff: gclient.py

Issue 6691034: First pass to transition away for gclient_utils.Error and gclient_utils.CheckedCallError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 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 e63f85abd0d25feb905ead132990e08143c4f963..9a678220f117760ad2c9c5c4cdefa21705a35839 100644
--- a/gclient.py
+++ b/gclient.py
@@ -68,6 +68,7 @@ import fix_encoding
import gclient_scm
import gclient_utils
from third_party.repo.progress import Progress
+import subprocess2
def attr(attribute, data):
@@ -453,7 +454,7 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem):
try:
gclient_utils.CheckCallAndFilterAndHeader(
command, cwd=self.root_dir(), always=True)
- except gclient_utils.Error, e:
+ except (gclient_utils.Error, subprocess2.CalledProcessError), 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.
@@ -1261,7 +1262,7 @@ def Main(argv):
# Not a known command. Default to help.
GenUsage(parser, 'help')
return CMDhelp(parser, argv)
- except gclient_utils.Error, e:
+ except (gclient_utils.Error, subprocess2.CalledProcessError), e:
print >> sys.stderr, 'Error: %s' % str(e)
return 1
« 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