Fix normalize_string_keys function'

This commit is contained in:
Matthew Honnibal 2017-05-31 14:08:16 -05:00
parent 67ade63fc4
commit 99982684b0

View File

@ -79,7 +79,7 @@ def is_config(python2=None, python3=None, windows=None, linux=None, osx=None):
def normalize_string_keys(old):
'''Given a dictionary, make sure keys are unicode strings, not bytes.'''
new = {}
for key, value in old:
for key, value in old.items():
if isinstance(key, bytes_):
new[key.decode('utf8')] = value
else: