Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PCbuild/get_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pathlib
import sys
import time
import urllib.error
import zipfile
from urllib.request import urlretrieve

Expand All @@ -19,7 +20,7 @@ def retrieve_with_retries(download_location, output_path, reporthook,
output_path,
reporthook=reporthook,
)
except ConnectionError as ex:
except (urllib.error.URLError, ConnectionError) as ex:
if attempt == max_retries:
msg = f"Download from {download_location} failed."
raise OSError(msg) from ex
Expand Down
2 changes: 1 addition & 1 deletion Tools/build/generate_sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def download_with_retries(download_location: str,
for attempt in range(max_retries + 1):
try:
resp = urllib.request.urlopen(download_location)
except urllib.error.URLError as ex:
except (urllib.error.URLError, ConnectionError) as ex:
if attempt == max_retries:
msg = f"Download from {download_location} failed."
raise OSError(msg) from ex
Expand Down
Loading