| Index: scripts/common/cros_chromite.py
|
| diff --git a/scripts/common/cros_chromite.py b/scripts/common/cros_chromite.py
|
| index d98de3f2e5097b3a14f5b2d59b2cb81761a16ca5..0b34559cac156983039117a0f740d1ee6007cb28 100755
|
| --- a/scripts/common/cros_chromite.py
|
| +++ b/scripts/common/cros_chromite.py
|
| @@ -500,10 +500,15 @@ class ChromiteFetcher(object):
|
| # Force no authentication. Chromite is public! By default, 'requests' will
|
| # use 'netrc' for authentication. This can cause the load to fail if
|
| # the '.netrc' has an invalid entry, failing authentication.
|
| - return requests.get(
|
| + res = requests.get(
|
| url,
|
| verify=True,
|
| - auth=lambda r: r).text
|
| + auth=lambda r: r)
|
| + if res.status_code != 200:
|
| + raise GitilesError(
|
| + url, 'Unexpected HTTP status code %d; body: %s' % (
|
| + res.status_code, res.text))
|
| + return res.text
|
| except requests.exceptions.RequestException as e:
|
| raise GitilesError(url, 'Request raised exception: %s' % (e,))
|
|
|
|
|