mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
getdeps: regard IOError as transient when fetching URLs
Summary: this should help avoid this particular error: ``` IOError: [Errno socket error] [Errno 11001] getaddrinfo failed ``` Reviewed By: chadaustin Differential Revision: D17886598 fbshipit-source-id: bd9f5b84ebd7ca5c339be3afec3a975fa907d052
This commit is contained in:
committed by
Facebook Github Bot
parent
0ea7147da3
commit
185282d1c6
@@ -572,7 +572,7 @@ def download_url_to_file_with_progress(url, file_name):
|
|||||||
start = time.time()
|
start = time.time()
|
||||||
try:
|
try:
|
||||||
(_filename, headers) = urlretrieve(url, file_name, reporthook=progress.progress)
|
(_filename, headers) = urlretrieve(url, file_name, reporthook=progress.progress)
|
||||||
except OSError as exc:
|
except (OSError, IOError) as exc:
|
||||||
raise TransientFailure(
|
raise TransientFailure(
|
||||||
"Failed to download %s to %s: %s" % (url, file_name, str(exc))
|
"Failed to download %s to %s: %s" % (url, file_name, str(exc))
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user