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

Side by Side Diff: appengine/config_service/storage.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
« no previous file with comments | « appengine/config_service/services_test.py ('k') | appengine/config_service/storage_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 """Storage of config files.""" 5 """Storage of config files."""
6 6
7 import hashlib 7 import hashlib
8 import logging 8 import logging
9 9
10 from google.appengine.api import app_identity 10 from google.appengine.api import app_identity
11 from google.appengine.ext import ndb 11 from google.appengine.ext import ndb
12 from google.appengine.ext.ndb import msgprop 12 from google.appengine.ext.ndb import msgprop
13 from google.protobuf import text_format 13 from google.protobuf import text_format
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 content_hash = content_hash or compute_hash(content) 262 content_hash = content_hash or compute_hash(content)
263 263
264 # pylint: disable=E1120 264 # pylint: disable=E1120
265 if not Blob.get_by_id(content_hash): 265 if not Blob.get_by_id(content_hash):
266 yield Blob(id=content_hash, content=content).put_async() 266 yield Blob(id=content_hash, content=content).put_async()
267 raise ndb.Return(content_hash) 267 raise ndb.Return(content_hash)
268 268
269 269
270 def import_blob(content, content_hash=None): 270 def import_blob(content, content_hash=None):
271 return import_blob_async(content, content_hash=content_hash).get_result() 271 return import_blob_async(content, content_hash=content_hash).get_result()
OLDNEW
« no previous file with comments | « appengine/config_service/services_test.py ('k') | appengine/config_service/storage_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698