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

Unified Diff: build/linux/sysroot_scripts/install-sysroot.py

Issue 2538833006: Remove wget usage from install-sysroot.py (Closed)
Patch Set: Created 4 years 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: build/linux/sysroot_scripts/install-sysroot.py
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
index d1e392f3be7b5477791670aee4c6486da0e8dd05..109d5532b518bcbdfa96d44de4b395bcf6ba1898 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -25,6 +25,7 @@ import re
import shutil
import subprocess
import sys
+import urllib
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.dirname(os.path.dirname(SCRIPT_DIR)))
@@ -245,8 +246,14 @@ def InstallSysroot(target_platform, target_arch):
print 'Downloading %s' % url
sys.stdout.flush()
sys.stderr.flush()
- subprocess.check_call(
- ['wget', '--quiet', '-t', '3', '-O', tarball, url])
+ for _ in range(3):
+ try:
+ urllib.urlretrieve(url, tarball)
+ break
+ except:
+ pass
+ else:
+ raise Error('Failed to download %s' % url)
sha1sum = GetSha1(tarball)
if sha1sum != tarball_sha1sum:
raise Error('Tarball sha1sum is wrong.'
« 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