0001-misc-raise-an-urllib2.HTTPError-if-get_url-returns-a.patch
src/authentic2/http_utils.py | ||
---|---|---|
30 | 30 |
c.perform() |
31 | 31 |
r = buf.getvalue() |
32 | 32 |
buf.close() |
33 |
http_code = c.getinfo(pycurl.HTTP_CODE) |
|
34 |
if http_code != 200: |
|
35 |
raise urllib2.HTTPError(url, http_code, None, None, None) |
|
33 | 36 |
return r |
34 | 37 |
except pycurl.error, e: |
35 | 38 |
# Wrap error |
36 |
- |