Skip to content

Commit 18c80d2

Browse files
authored
docs: better message for download extensions (#18606)
1 parent 3e2cd24 commit 18c80d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.actions/assistant.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,10 @@ def pull_docs_files(
450450

451451
with tempfile.TemporaryDirectory() as tmp:
452452
zip_file = os.path.join(tmp, "repo.zip")
453-
urllib.request.urlretrieve(zip_url, zip_file)
453+
try:
454+
urllib.request.urlretrieve(zip_url, zip_file)
455+
except urllib.error.HTTPError:
456+
raise urllib.error.HTTPError(f"Requesting file '{zip_url}' does not exist or it is just unavailable.")
454457

455458
with zipfile.ZipFile(zip_file, "r") as zip_ref:
456459
zip_ref.extractall(tmp)

0 commit comments

Comments
 (0)