GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-134262: Fix off by one errors in download retry functions (GH-134867) · python/cpython@e64395e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • PCbuild
    • get_external.py
  • Tools/build
    • generate_sbom.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎PCbuild/get_external.py‎

Copy file name to clipboardExpand all lines: PCbuild/get_external.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def retrieve_with_retries(download_location, output_path, reporthook,
1313
max_retries=7):
1414
"""Download a file with exponential backoff retry and save to disk."""
15-
for attempt in range(max_retries):
15+
for attempt in range(max_retries + 1):
1616
try:
1717
resp = urlretrieve(
1818
download_location,
Collapse file

‎Tools/build/generate_sbom.py‎

Copy file name to clipboardExpand all lines: Tools/build/generate_sbom.py
+1-1Lines 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-
for attempt in range(max_retries):
172+
for attempt in range(max_retries + 1):
173173
try:
174174
resp = urllib.request.urlopen(download_location)
175175
except urllib.error.URLError as ex:

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.