Use six.iteritems to make dict work on Python2/3
six.iteritems returns an iterator over dictionary‘s items. This replaces dictionary.iteritems() on Python 2 and dictionary.items() on Python 3. See http://pythonhosted.org/six/#six.iteritems Part of blueprint py33 Change-Id: I72ef4e2ab6944e58069f9476b2e6dca10c9c94aa
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import six
|
||||
|
||||
from stackalytics.openstack.common import log as logging
|
||||
from stackalytics.processor import utils
|
||||
|
||||
@@ -63,6 +65,6 @@ NORMALIZERS = {
|
||||
|
||||
|
||||
def normalize_default_data(default_data):
|
||||
for key, normalizer in NORMALIZERS.iteritems():
|
||||
for key, normalizer in six.iteritems(NORMALIZERS):
|
||||
if key in default_data:
|
||||
normalizer(default_data[key])
|
||||
|
||||
Reference in New Issue
Block a user