From 185282d1c669ec4cf5063dc2ea64c26393e43ffb Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 17 Oct 2019 02:17:45 -0700 Subject: [PATCH] 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 --- build/fbcode_builder/getdeps/fetcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/fbcode_builder/getdeps/fetcher.py b/build/fbcode_builder/getdeps/fetcher.py index 058986a94..e69797762 100644 --- a/build/fbcode_builder/getdeps/fetcher.py +++ b/build/fbcode_builder/getdeps/fetcher.py @@ -572,7 +572,7 @@ def download_url_to_file_with_progress(url, file_name): start = time.time() try: (_filename, headers) = urlretrieve(url, file_name, reporthook=progress.progress) - except OSError as exc: + except (OSError, IOError) as exc: raise TransientFailure( "Failed to download %s to %s: %s" % (url, file_name, str(exc)) )