From a57f978678b7f42c53ac448b753ac46dfdce3269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=82=88?= Date: Tue, 2 Jul 2019 15:08:47 -0400 Subject: [PATCH] anaconda: add retry and time limit --- anaconda.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anaconda.py b/anaconda.py index 7b3c04b..b501bc5 100755 --- a/anaconda.py +++ b/anaconda.py @@ -71,7 +71,8 @@ def curl_download(remote_url: str, dst_file: Path, md5: str = None): sp.check_call([ "curl", "-o", str(dst_file), "-sL", "--remote-time", "--show-error", - "--fail", remote_url, + "--fail", "--retry", "10", "--speed-time", "15", + "--speed-limit", "5000", remote_url, ]) if md5 and (not md5_check(dst_file, md5)): return "MD5 mismatch"