Skip to content

Commit

Permalink
optimize download retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Jun 1, 2024
1 parent 4f573c4 commit c38fd2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/cmake/file_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c38fd2b

Please sign in to comment.