Skip to content

Commit

Permalink
turn mismatching content types into a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-rauch committed Mar 26, 2022
1 parent 292c2b2 commit 86d3d96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def download_check_fail(url, expected_type):
if not response.ok:
raise RuntimeError("error retrieving "+response.url)
if response.headers.get('content-type') != expected_type:
raise RuntimeError("invalid format of "+response.url)
print("Warning: invalid content type, expected '{}', got '{}'".format(
expected_type, response.headers.get('content-type')))
return response

def read_downloadable_archives(package):
Expand Down

0 comments on commit 86d3d96

Please sign in to comment.