From a7bb3a767c0830ca881cc6deb548c72e2c06cb46 Mon Sep 17 00:00:00 2001 From: konsti Date: Thu, 17 Oct 2024 16:31:23 +0200 Subject: [PATCH] Add URL context to publish test script (#8289) For #8288 --- scripts/publish/test_publish.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/publish/test_publish.py b/scripts/publish/test_publish.py index 5d1ec5ca6..eb6127e95 100644 --- a/scripts/publish/test_publish.py +++ b/scripts/publish/test_publish.py @@ -97,7 +97,10 @@ def get_new_version(project_name: str) -> str: # pick a version that doesn't exist on any target yet versions = set() for url in project_urls[project_name]: - data = httpx.get(url).text + try: + data = httpx.get(url).text + except httpx.HTTPError as err: + raise RuntimeError(f"Failed to fetch {url}") from err href_text = "]+>([^<>]+)" for filename in list(m.group(1) for m in re.finditer(href_text, data)): if filename.endswith(".whl"):