[PATCH] build-many-glibcs.py: Include URL in download exception
Florian Weimer
fweimer@redhat.com
Mon Dec 8 09:01:22 GMT 2025
---
scripts/build-many-glibcs.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index bda15d741a..3be9847299 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -1034,8 +1034,11 @@ class Context(object):
version_major = version.split('.')[0]
url = url_map[component] % {'version': version, 'major': version_major}
filename = os.path.join(self.srcdir, url.split('/')[-1])
- response = urllib.request.urlopen(url)
- data = response.read()
+ try:
+ with urllib.request.urlopen(url) as response:
+ data = response.read()
+ except:
+ raise IOError('downloading ' + repr(url))
with open(filename, 'wb') as f:
f.write(data)
subprocess.run(['tar', '-C', self.srcdir, '-x', '-f', filename],
base-commit: 82f4758410d9e4f149ea916504a407ea890d9f76
More information about the Libc-alpha
mailing list