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

Unified Diff: tools/isolate/run_test_from_archive.py

Issue 10187007: Update run_test_from_archive.py to handle 404 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use retrieve to get data Created 8 years, 8 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: tools/isolate/run_test_from_archive.py
diff --git a/tools/isolate/run_test_from_archive.py b/tools/isolate/run_test_from_archive.py
index 2c56bc823384322c5dc06c5b6c0f046b81f2ff00..2223908f2500a43f6b52baf654af25dfe4cefa5d 100755
--- a/tools/isolate/run_test_from_archive.py
+++ b/tools/isolate/run_test_from_archive.py
@@ -117,7 +117,10 @@ def open_remote(file_or_url):
def download_or_copy(file_or_url, dest):
"""Copies a file or download an url."""
if re.match(r'^https?://.+$', file_or_url):
- urllib.urlretrieve(file_or_url, dest)
+ try:
+ urllib.URLopener().retrieve(file_or_url, dest)
csharp 2012/04/24 15:18:47 I don't see any need to create a new subclass sinc
+ except IOError:
+ logging.error('Failed to download ' + file_or_url)
else:
shutil.copy(file_or_url, dest)
« 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