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

Unified Diff: gclient_scm.py

Issue 7859032: Now that CheckCallAndFilter() throws subprocess2.CalledProcessError, use e.returncode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 3 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: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 5e64afcedd8cf25a0ea4c89ab8cb4b34510ab56d..15e9eb9b2a57aeedeefb7fc3a81e105ac2906a73 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -506,13 +506,11 @@ class GitWrapper(SCMWrapper):
try:
self._Run(clone_cmd, options, cwd=self._root_dir)
break
- except (gclient_utils.Error, subprocess2.CalledProcessError), e:
- # TODO(maruel): Hackish, should be fixed by moving _Run() to
- # subprocess2.check_output().
- # Too bad we don't have access to the actual output.
+ except subprocess2.CalledProcessError, e:
+ # Too bad we don't have access to the actual output yet.
# We should check for "transfer closed with NNN bytes remaining to
# read". In the meantime, just make sure .git exists.
- if (e.args[0] == 'git command clone returned 128' and
+ if (e.returncode == 128 and
os.path.exists(os.path.join(self.checkout_path, '.git'))):
print(str(e))
print('Retrying...')
« 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