From: Florian Weimer Date: Mon, 8 Dec 2025 22:31:02 +0000 (+0100) Subject: build-many-glibcs.py: Include URL in download exception X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2677916d1ccd568951d3b3e29df7076648e157a2;p=thirdparty%2Fglibc.git build-many-glibcs.py: Include URL in download exception Reviewed-by: Carlos O'Donell --- diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 586a2d8f83..940b66a09a 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -1074,8 +1074,11 @@ class Context(object): baseurl = os.environ.get('FTP_GNU_ORG_MIRROR' , 'https://ftp.gnu.org').rstrip('/') url = url_map[component] % {'version': version, 'major': version_major, 'baseurl': baseurl} 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],