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) |