Replace dict.iteritems() with six.iteritems()

dict.iteritems() was replaced with dict.items() in Python 3. Use the
six.iteritems() function to get code compatible with Python 2 and Python 3.

Change-Id: I0c8ecc3ae540ffaf4c6b159e09ca16ccf365973d
This commit is contained in:
Victor Stinner
2013-12-18 14:58:31 +01:00
parent 64f91d30a8
commit 062c8ac7dd
6 changed files with 14 additions and 10 deletions

View File

@@ -25,6 +25,7 @@ import os
import fixtures
from oslo.config import cfg
import six
import testtools
from oslo.messaging.openstack.common.fixture import moxstubout
@@ -79,5 +80,5 @@ class BaseTestCase(testtools.TestCase):
test by the tearDown() method.
"""
group = kw.pop('group', None)
for k, v in kw.iteritems():
for k, v in six.iteritems(kw):
self.conf.set_override(k, v, group)