Commit a4847948 authored by Jie Luo's avatar Jie Luo Committed by GitHub

Use keys() instead of iterkeys() to be python3 compatbile.

parent 72cc5a6e
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment