From 2b8f033cd6b09a51b838cf81b878ed04ac4f73af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Stefanik?= Date: Sun, 17 Dec 2023 23:55:27 +0100 Subject: [PATCH] More verbose error message on HTTP errors --- lib/generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/generator.py b/lib/generator.py index 8e1702a7..b764ccd8 100755 --- a/lib/generator.py +++ b/lib/generator.py @@ -290,7 +290,8 @@ def download_file(self, url, directory, file_name): with open(abs_file_name, 'wb') as target_file: target_file.write(response.raw.read()) else: - raise requests.HTTPError("Download failed.") + raise requests.HTTPError("Download failed: HTTP " + + response.status_code + " " + response.reason) return abs_file_name def get_packages(self):