| Index: tools/findit/common/http_client_local.py
|
| diff --git a/tools/findit/common/http_client_local.py b/tools/findit/common/http_client_local.py
|
| index bf386f9a3968ddbc183ca3687ac570d2bbff9f56..fccb0b60266b44fe1300a6d77e78b195685ab671 100644
|
| --- a/tools/findit/common/http_client_local.py
|
| +++ b/tools/findit/common/http_client_local.py
|
| @@ -205,11 +205,20 @@ def _SendRequest(url, timeout=None):
|
| urllib2.HTTPCookieProcessor(cookielib.MozillaCookieJar(cookie_file)))
|
|
|
| url_opener = urllib2.build_opener(*handlers)
|
| - if timeout is not None:
|
| +
|
| + status_code = None
|
| + content = None
|
| +
|
| + try:
|
| response = url_opener.open(url, timeout=timeout)
|
| - else:
|
| - response = url_opener.open(url)
|
| - return response.code, response.read()
|
| +
|
| + status_code = response.code
|
| + content = response.read()
|
| + except urllib2.HTTPError as e:
|
| + status_code = e.code
|
| + content = None
|
| +
|
| + return status_code, content
|
|
|
|
|
| class HttpClientLocal(http_client.HttpClient):
|
|
|