Merge "Replace six.iteritems() with .items()"

This commit is contained in:
Jenkins 2017-04-09 07:02:45 +00:00 committed by Gerrit Code Review
commit 9be6f12dfc

View File

@ -18,12 +18,11 @@
# under the License.
from oslo_config import cfg
import six
def recursive_keypairs(d, separator='.'):
# taken from ceilometer and gnocchi
for name, value in sorted(six.iteritems(d)):
for name, value in sorted(d.items()):
if isinstance(value, dict):
for subname, subvalue in recursive_keypairs(value, separator):
yield ('%s%s%s' % (name, separator, subname), subvalue)