@@ -88,35 +88,35 @@ def _get_value_from_value_pb(value_pb):
8888 :returns: The value provided by the Protobuf.
8989 """
9090
91+ result = None
9192 if value_pb .HasField ('timestamp_microseconds_value' ):
9293 microseconds = value_pb .timestamp_microseconds_value
9394 naive = (datetime .utcfromtimestamp (0 ) +
9495 timedelta (microseconds = microseconds ))
95- return naive .replace (tzinfo = pytz .utc )
96+ result = naive .replace (tzinfo = pytz .utc )
9697
9798 elif value_pb .HasField ('key_value' ):
98- return Key .from_protobuf (value_pb .key_value )
99+ result = Key .from_protobuf (value_pb .key_value )
99100
100101 elif value_pb .HasField ('boolean_value' ):
101- return value_pb .boolean_value
102+ result = value_pb .boolean_value
102103
103104 elif value_pb .HasField ('double_value' ):
104- return value_pb .double_value
105+ result = value_pb .double_value
105106
106107 elif value_pb .HasField ('integer_value' ):
107- return value_pb .integer_value
108+ result = value_pb .integer_value
108109
109110 elif value_pb .HasField ('string_value' ):
110- return value_pb .string_value
111+ result = value_pb .string_value
111112
112113 elif value_pb .HasField ('entity_value' ):
113- return Entity .from_protobuf (value_pb .entity_value )
114+ result = Entity .from_protobuf (value_pb .entity_value )
114115
115116 elif value_pb .list_value :
116- return [_get_value_from_value_pb (x ) for x in value_pb .list_value ]
117+ result = [_get_value_from_value_pb (x ) for x in value_pb .list_value ]
117118
118- else :
119- return None
119+ return result
120120
121121
122122def _get_value_from_property_pb (property_pb ):
0 commit comments