Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite64395e

Browse files
authored
gh-134262: Fix off by one errors in download retry functions (GH-134867)
1 parente9d845b commite64395e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎PCbuild/get_external.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
defretrieve_with_retries(download_location,output_path,reporthook,
1313
max_retries=7):
1414
"""Download a file with exponential backoff retry and save to disk."""
15-
forattemptinrange(max_retries):
15+
forattemptinrange(max_retries+1):
1616
try:
1717
resp=urlretrieve(
1818
download_location,

‎Tools/build/generate_sbom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def download_with_retries(download_location: str,
169169
base_delay:float=2.25,
170170
max_jitter:float=1.0)->typing.Any:
171171
"""Download a file with exponential backoff retry."""
172-
forattemptinrange(max_retries):
172+
forattemptinrange(max_retries+1):
173173
try:
174174
resp=urllib.request.urlopen(download_location)
175175
excepturllib.error.URLErrorasex:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp