Skip to content

Commit

Permalink
More verbose error message on HTTP errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Googulator committed Dec 17, 2023
1 parent 63bfc3f commit 2b8f033
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2b8f033

Please sign in to comment.