diff options
author | Adam Cozzette <acozzette@google.com> | 2016-11-22 16:55:43 -0800 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2016-11-22 16:55:43 -0800 |
commit | 259dd7e842dd3a848a1094a42c05610e8a31dcbb (patch) | |
tree | 8796dfdd6245ba37a80e94c8d6b66c774aa2845f /python | |
parent | db35fe735a6522089250a0a0804fb1fd18340666 (diff) | |
download | protobuf-259dd7e842dd3a848a1094a42c05610e8a31dcbb.tar.gz protobuf-259dd7e842dd3a848a1094a42c05610e8a31dcbb.tar.bz2 protobuf-259dd7e842dd3a848a1094a42c05610e8a31dcbb.zip |
Updated descriptor_pool.py to be compatible with Python 3
In Python 3 the values() method on a dictionary returns a view instead
of a list, so we need to explicitly convert that to a list.
Diffstat (limited to 'python')
-rw-r--r-- | python/google/protobuf/descriptor_pool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/google/protobuf/descriptor_pool.py b/python/google/protobuf/descriptor_pool.py index 28b7e843..fc3a7f44 100644 --- a/python/google/protobuf/descriptor_pool.py +++ b/python/google/protobuf/descriptor_pool.py @@ -408,7 +408,7 @@ class DescriptorPool(object): Returns: A list of FieldDescriptor describing the extensions. """ - return self._extensions_by_number[message_descriptor].values() + return list(self._extensions_by_number[message_descriptor].values()) def _ConvertFileProtoToFileDescriptor(self, file_proto): """Creates a FileDescriptor from a proto or returns a cached copy. |