@@ -88,35 +88,35 @@ def _get_value_from_value_pb(value_pb):
88
88
:returns: The value provided by the Protobuf.
89
89
"""
90
90
91
+ result = None
91
92
if value_pb .HasField ('timestamp_microseconds_value' ):
92
93
microseconds = value_pb .timestamp_microseconds_value
93
94
naive = (datetime .utcfromtimestamp (0 ) +
94
95
timedelta (microseconds = microseconds ))
95
- return naive .replace (tzinfo = pytz .utc )
96
+ result = naive .replace (tzinfo = pytz .utc )
96
97
97
98
elif value_pb .HasField ('key_value' ):
98
- return Key .from_protobuf (value_pb .key_value )
99
+ result = Key .from_protobuf (value_pb .key_value )
99
100
100
101
elif value_pb .HasField ('boolean_value' ):
101
- return value_pb .boolean_value
102
+ result = value_pb .boolean_value
102
103
103
104
elif value_pb .HasField ('double_value' ):
104
- return value_pb .double_value
105
+ result = value_pb .double_value
105
106
106
107
elif value_pb .HasField ('integer_value' ):
107
- return value_pb .integer_value
108
+ result = value_pb .integer_value
108
109
109
110
elif value_pb .HasField ('string_value' ):
110
- return value_pb .string_value
111
+ result = value_pb .string_value
111
112
112
113
elif value_pb .HasField ('entity_value' ):
113
- return Entity .from_protobuf (value_pb .entity_value )
114
+ result = Entity .from_protobuf (value_pb .entity_value )
114
115
115
116
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 ]
117
118
118
- else :
119
- return None
119
+ return result
120
120
121
121
122
122
def _get_value_from_property_pb (property_pb ):
0 commit comments