From a9a2f12adbb183fc554d3cb038d6298bcacfaae2 Mon Sep 17 00:00:00 2001 From: Ben Cordero Date: Fri, 18 Nov 2016 20:44:16 +0000 Subject: [PATCH] openstack: iterate through nova addresses with six (#18408) --- lib/ansible/module_utils/openstack.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/openstack.py b/lib/ansible/module_utils/openstack.py index 2740b51cb94..602576c419a 100644 --- a/lib/ansible/module_utils/openstack.py +++ b/lib/ansible/module_utils/openstack.py @@ -28,6 +28,7 @@ import os +from ansible.module_utils.six import iteritems def openstack_argument_spec(): # DEPRECATED: This argument spec is only used for the deprecated old @@ -61,7 +62,7 @@ def openstack_argument_spec(): def openstack_find_nova_addresses(addresses, ext_tag, key_name=None): ret = [] - for (k, v) in addresses.iteritems(): + for (k, v) in iteritems(addresses): if key_name and k == key_name: ret.extend([addrs['addr'] for addrs in v]) else: