From c38fd2b03483b29604bcb8a03d71a4ec6c105fc7 Mon Sep 17 00:00:00 2001 From: Neucrack Date: Sun, 2 Jun 2024 01:35:12 +0800 Subject: [PATCH] optimize download retry --- tools/cmake/file_downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cmake/file_downloader.py b/tools/cmake/file_downloader.py index fdab0483..02fe9502 100644 --- a/tools/cmake/file_downloader.py +++ b/tools/cmake/file_downloader.py @@ -128,7 +128,7 @@ def __init__(self, url, save_path, max_thead_num = 8, callback=None, force_write raise Exception("Download file error: " + res.status_code) else: if res.status_code != 206: - self.total = res.content: + self.total = res.content print("-- get content-length failed, try directly download, it may be slow") res = requests.get(self.url, headers=self.headers) if res.status_code == 200: