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

Side by Side Diff: appengine/swarming/message_conversion.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, 7 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/swarming/mapreduce_jobs.py ('k') | appengine/swarming/proto/Makefile » ('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 """This module facilitates conversion from dictionaries to ProtoRPC messages. 5 """This module facilitates conversion from dictionaries to ProtoRPC messages.
6 6
7 Given a dictionary whose keys' names and values' types comport with the 7 Given a dictionary whose keys' names and values' types comport with the
8 fields defined for a protorpc.messages.Message subclass, this module tries to 8 fields defined for a protorpc.messages.Message subclass, this module tries to
9 generate a Message instance that corresponds to the provided dictionary. The 9 generate a Message instance that corresponds to the provided dictionary. The
10 "normal" use case is for ndb.Models which need to be represented as a 10 "normal" use case is for ndb.Models which need to be represented as a
11 ProtoRPC. 11 ProtoRPC.
12 """ 12 """
13 13
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 kwargs['costs_usd'].append(entity.cost_usd) 223 kwargs['costs_usd'].append(entity.cost_usd)
224 kwargs['properties_hash'] = None 224 kwargs['properties_hash'] = None
225 kwargs['tags'] = [] 225 kwargs['tags'] = []
226 kwargs['user'] = None 226 kwargs['user'] = None
227 else: 227 else:
228 assert entity.__class__ is task_result.TaskResultSummary, entity 228 assert entity.__class__ is task_result.TaskResultSummary, entity
229 kwargs['properties_hash'] = ( 229 kwargs['properties_hash'] = (
230 entity.properties_hash.encode('hex') 230 entity.properties_hash.encode('hex')
231 if entity.properties_hash else None) 231 if entity.properties_hash else None)
232 return _ndb_to_rpc(swarming_rpcs.TaskResult, entity, **kwargs) 232 return _ndb_to_rpc(swarming_rpcs.TaskResult, entity, **kwargs)
OLDNEW
« no previous file with comments | « appengine/swarming/mapreduce_jobs.py ('k') | appengine/swarming/proto/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698