1
0
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:
Wez Furlong
2019-10-17 02:17:45 -07:00
committed by Facebook Github Bot
parent 0ea7147da3
commit 185282d1c6

View File

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