Change len(obj.keys()) to len(obj) in tools/get-handlebar-vars.

This prevents libmodernize.fixes.fix_dict_six from reporting
this on running tools/travis/py3k.
This commit is contained in:
Eklavya Sharma 2016-04-05 12:02:33 +05:30 committed by Tim Abbott
parent 0af154a301
commit ab02ab31e3
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ def parse_file(fn):
if isinstance(obj, list): if isinstance(obj, list):
return [clean_this(item) for item in obj] return [clean_this(item) for item in obj]
if isinstance(obj, dict): if isinstance(obj, dict):
if len(obj.keys()) == 1 and 'this' in obj: if len(obj) == 1 and 'this' in obj:
return clean_this(obj['this']) return clean_this(obj['this'])
return {k: clean_this(v) for k, v in obj.items()} return {k: clean_this(v) for k, v in obj.items()}
return obj return obj