Fix python3 support in yaml-validate script.

Python3 drops the "iteritems" method for dict in favor to
"items".

Change-Id: I8d21233e917b5d36be385d59f1a7c9a0588aea2d
Closes-Bug: 1783988
This commit is contained in:
Cédric Jeanneret 2018-07-27 13:48:09 +02:00
parent e87fcba49d
commit d37308d63c
2 changed files with 2 additions and 1 deletions

View File

@ -810,7 +810,7 @@ def _rsearch_keys(d, pattern, search_keynames=False, enter_lists=False):
path = []
# recursively walk through the dict, optionally entering lists
if isinstance(d, dict):
for k, v in d.iteritems():
for k, v in d.items():
path.append(k)
if (isinstance(v, dict) or enter_lists and
isinstance(v, list)):

View File

@ -16,6 +16,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}'
commands = {posargs}
[testenv:pep8]
basepython = python3
whitelist_externals =
bash
commands =