From 3beac898931f8d235fd90182ea40a381c23cedba Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 13 Dec 2016 05:47:24 -0800 Subject: [PATCH] Remove itervalues (not available on py3) (cherry picked from 51491c990444be4153d8d4e07ced00f8af348ddd) --- contrib/inventory/nova.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/inventory/nova.py b/contrib/inventory/nova.py index fc1b656e325..f8c1617735a 100755 --- a/contrib/inventory/nova.py +++ b/contrib/inventory/nova.py @@ -26,7 +26,7 @@ import re import os import ConfigParser from novaclient import client as nova_client -from six import iteritems +from six import iteritems, itervalues try: import json @@ -105,7 +105,7 @@ def get_ips(server, access_ip=True): # Iterate through each servers network(s), get addresses and get type addresses = getattr(server, 'addresses', {}) if len(addresses) > 0: - for network in addresses.itervalues(): + for network in itervalues(addresses): for address in network: if address.get('OS-EXT-IPS:type', False) == 'fixed': private.append(address['addr'])