Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: appengine/findit/common/http_client_appengine.py

Issue 1154593005: [Findit] Add a sub-pipeline to analyze failures caused by DEPS rolls. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Improve readability. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 6
7 from google.appengine.api import urlfetch 7 from google.appengine.api import urlfetch
8 8
9 from common.retry_http_client import RetryHttpClient 9 from common.retry_http_client import RetryHttpClient
10 10
11 11
12 class HttpClientAppengine(RetryHttpClient): # pragma: no cover 12 class HttpClientAppengine(RetryHttpClient): # pragma: no cover
13 """A http client for running on appengine.""" 13 """A http client for running on appengine."""
14 14
15 def _Get(self, url, timeout): 15 def _Get(self, url, timeout):
16 # We wanted to validate certificate to avoid the man in the middle. 16 # We wanted to validate certificate to avoid the man in the middle.
17 result = urlfetch.fetch(url, deadline=timeout, validate_certificate=True) 17 result = urlfetch.fetch(url, deadline=timeout, validate_certificate=True)
18 18
19 if result.status_code != 200: 19 if result.status_code != 200:
20 logging.error('Request to %s failed with code=%d: %s', 20 logging.error('Request to %s resulted in %d', url, result.status_code)
21 url, result.status_code, result.content)
22 21
23 return result.status_code, result.content 22 return result.status_code, result.content
OLDNEW
« no previous file with comments | « appengine/findit/common/dependency.py ('k') | appengine/findit/common/test/chromium_deps_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698