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

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

Issue 2554753005: Fix install-sysroot.py script not working behind proxy. (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 109d5532b518bcbdfa96d44de4b395bcf6ba1898..13b089120680ff3274b8f18763baebf964b6b23d 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -25,7 +25,7 @@ import re
import shutil
import subprocess
import sys
-import urllib
+import urllib2
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.dirname(os.path.dirname(SCRIPT_DIR)))
@@ -248,7 +248,9 @@ def InstallSysroot(target_platform, target_arch):
sys.stderr.flush()
for _ in range(3):
try:
- urllib.urlretrieve(url, tarball)
+ response = urllib2.urlopen(url)
+ with open(tarball, "wb") as f:
+ f.write(response.read())
break
except:
pass
« 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