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.
This commit is contained in:
Marius Gedminas 2015-09-03 09:23:27 +03:00
parent 9e1bc434c7
commit 823677b490
28 changed files with 81 additions and 41 deletions

View file

@ -25,6 +25,9 @@ import os
import sys
from optparse import OptionParser
from six import iteritems
class ProxmoxNodeList(list):
def get_names(self):
return [node['node'] for node in self]
@ -32,7 +35,7 @@ class ProxmoxNodeList(list):
class ProxmoxQemu(dict):
def get_variables(self):
variables = {}
for key, value in self.iteritems():
for key, value in iteritems(self):
variables['proxmox_' + key] = value
return variables