示例#1
0
 def Update(self, drink, force=False):
   previous = None
   try:
     if not force and self.stats:
       previous = protoutil.DictToProtoMessage(self.stats, models_pb2.Stats())
   except TypeError, e:
     pass
示例#2
0
def StatsToProto(record, full=False):
    return protoutil.DictToProtoMessage(record.stats, models_pb2.Stats())