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

Side by Side Diff: appengine/components/components/net.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 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 2015 The LUCI Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Wrapper around urlfetch to call REST API with service account credentials.""" 5 """Wrapper around urlfetch to call REST API with service account credentials."""
6 6
7 import json 7 import json
8 import logging 8 import logging
9 import urllib 9 import urllib
10 import urlparse 10 import urlparse
11 11
12 from google.appengine.api import urlfetch 12 from google.appengine.api import urlfetch
13 from google.appengine.ext import ndb 13 from google.appengine.ext import ndb
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 try: 234 try:
235 response = json.loads(response) 235 response = json.loads(response)
236 except ValueError as e: 236 except ValueError as e:
237 raise Error('Bad JSON response: %s' % e, None, response) 237 raise Error('Bad JSON response: %s' % e, None, response)
238 raise ndb.Return(response) 238 raise ndb.Return(response)
239 239
240 240
241 def json_request(*args, **kwargs): 241 def json_request(*args, **kwargs):
242 """Blocking version of json_request_async.""" 242 """Blocking version of json_request_async."""
243 return json_request_async(*args, **kwargs).get_result() 243 return json_request_async(*args, **kwargs).get_result()
OLDNEW
« no previous file with comments | « appengine/components/components/natsort_test.py ('k') | appengine/components/components/net_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698