Skip to content

Commit 1bf0137

Browse files
Revert "ios: retry curl with http1.1, attempt to fix curl failure"
This reverts commit 8cfb4ca. ... pr comments flagged, this failure in ci could have been due to flaky issues
1 parent 27b3fa0 commit 1bf0137

1 file changed

Lines changed: 10 additions & 30 deletions

File tree

Apple/__main__.py

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -345,36 +345,16 @@ def download(url: str, target_dir: Path) -> Path:
345345

346346
out_path = target_path / basename(url)
347347
if not Path(out_path).is_file():
348-
curl_attempts = [
349-
[],
350-
# Retry over HTTP/1.1 if the initial transfer fails with a curl
351-
# transport error (commonly seen with some runner/proxy setups).
352-
["--http1.1"],
353-
]
354-
for i, extra_args in enumerate(curl_attempts, 1):
355-
try:
356-
run([
357-
"curl",
358-
"-Lf",
359-
"--retry",
360-
"5",
361-
"--retry-all-errors",
362-
*extra_args,
363-
"-o",
364-
out_path,
365-
url,
366-
])
367-
except CalledProcessError as exc:
368-
if i < len(curl_attempts) and exc.returncode in {16, 56, 92}:
369-
out_path.unlink(missing_ok=True)
370-
print(
371-
f"curl exited {exc.returncode}; "
372-
"retrying download with --http1.1"
373-
)
374-
continue
375-
raise
376-
else:
377-
break
348+
run([
349+
"curl",
350+
"-Lf",
351+
"--retry",
352+
"5",
353+
"--retry-all-errors",
354+
"-o",
355+
out_path,
356+
url,
357+
])
378358
else:
379359
print(f"Using cached version of {basename(url)}")
380360
return out_path

0 commit comments

Comments
 (0)