Commit 59cefa5e authored by Raul Tambre's avatar Raul Tambre Committed by Commit Bot

devtools_api: Fix Python 3 compatibility

itervalues() no longer exists in Python 3. values() works on both.

Traceback (most recent call last):
  File "../../headless/lib/browser/devtools_api/client_api_generator.py", line 525, in <module>
    InitializeDomainDependencies(json_api)
  File "../../headless/lib/browser/devtools_api/client_api_generator.py", line 425, in InitializeDomainDependencies
    GetDomainDepsFromRefs(domain['domain'], domain)
  File "../../headless/lib/browser/devtools_api/client_api_generator.py", line 413, in GetDomainDepsFromRefs
    for value in json.itervalues():
AttributeError: 'dict' object has no attribute 'itervalues'

Bug: 941669
Change-Id: I24a888b95ead33b9a9abfdd84f08ac5fc10b4136
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089862
Auto-Submit: Raul Tambre <raul@tambre.ee>
Reviewed-by: default avatarJohannes Henkel <johannes@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#747576}
parent 030c71c8
......@@ -410,7 +410,7 @@ def InitializeDomainDependencies(json_api):
if not isinstance(json, dict):
return
for value in json.itervalues():
for value in json.values():
GetDomainDepsFromRefs(domain_name, value)
if '$ref' in json:
......
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