diff options
| author | Michael Williamson <mike@zwobble.org> | 2020-04-18 22:11:40 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2020-04-18 22:11:40 +0100 |
| commit | e3c13aff3bb0f73459a2950d2fcb95e7cc2715c9 (patch) | |
| tree | a260e6dcee59f2f9c6a0a88d69de2489c8d6802c /setup.py | |
| parent | a375b887e7c7773c5e1abc182b4a0edcd6ebcb05 (diff) | |
Check response status code
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -14,6 +14,8 @@ from setuptools.extension import Extension def urlretrieve(source_url, destination_path): response = requests.get(source_url, stream=True) + if response.status_code != 200: + raise Exception("status code was: {}".format(response.status_code)) with open(destination_path, "wb") as fileobj: for chunk in response.iter_content(chunk_size=128): |
