Use keys() instead of iterkeys() to be python3 compatbile.
This commit is contained in:
parent
72cc5a6eb3
commit
a484794820
@ -819,7 +819,7 @@ def MapEncoder(field_descriptor):
|
||||
encode_message = MessageEncoder(field_descriptor.number, False, False)
|
||||
|
||||
def EncodeField(write, value, deterministic):
|
||||
value_keys = sorted(value.iterkeys()) if deterministic else value.iterkeys()
|
||||
value_keys = sorted(value.keys()) if deterministic else value.keys()
|
||||
for key in value_keys:
|
||||
entry_msg = message_type._concrete_class(key=key, value=value[key])
|
||||
encode_message(write, entry_msg, deterministic)
|
||||
|
Loading…
Reference in New Issue
Block a user