diff options
author | Marius Gedminas <marius@gedmin.as> | 2015-09-03 08:23:27 +0200 |
---|---|---|
committer | Marius Gedminas <marius@gedmin.as> | 2015-09-03 08:23:27 +0200 |
commit | 823677b490d3ddc3bcfe8fa2f215d9d9c2167b14 (patch) | |
tree | 1e0915306f5dec06cb369b3aa5b30cac6b7699bb /contrib/inventory/rax.py | |
parent | Further cleanup from locking changes (diff) | |
download | ansible-823677b490d3ddc3bcfe8fa2f215d9d9c2167b14.tar.xz ansible-823677b490d3ddc3bcfe8fa2f215d9d9c2167b14.zip |
Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host). And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
Diffstat (limited to 'contrib/inventory/rax.py')
-rwxr-xr-x | contrib/inventory/rax.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/inventory/rax.py b/contrib/inventory/rax.py index 5892f2cbb9..0028f54d20 100755 --- a/contrib/inventory/rax.py +++ b/contrib/inventory/rax.py @@ -153,6 +153,8 @@ import warnings import collections import ConfigParser +from six import iteritems + from ansible.constants import get_config, mk_boolean try: @@ -267,7 +269,7 @@ def _list_into_cache(regions): hostvars[server.name]['rax_region'] = region - for key, value in server.metadata.iteritems(): + for key, value in iteritems(server.metadata): groups['%s_%s_%s' % (prefix, key, value)].append(server.name) groups['instance-%s' % server.id].append(server.name) |