From e50075b96f3161ddf53825e9670a9ba618759d24 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Wed, 13 Jul 2022 16:02:32 +0200 Subject: [PATCH] fix: expand the catch statement on util.download to be more robust (#1173) URLError and SSLError both subclass OSError. Should prevent random network errors like this from breaking the build https://app.circleci.com/pipelines/github/pypa/cibuildwheel/3668/workflows/6a3b6066-e892-48c4-bb6b-4c094b1c814e/jobs/9933?invite=true#step-103-623 --- cibuildwheel/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cibuildwheel/util.py b/cibuildwheel/util.py index f164b91a..d2287a05 100644 --- a/cibuildwheel/util.py +++ b/cibuildwheel/util.py @@ -316,7 +316,7 @@ def download(url: str, dest: Path) -> None: dest.write_bytes(response.read()) return - except urllib.error.URLError: + except OSError: if i == repeat_num - 1: raise sleep(3)