Removed dict.iteritems() in modules. (#18859)

This is for py3 compatibility, addressed in #18506
This commit is contained in:
Andrea Tartaglia
2016-12-12 23:16:23 +00:00
committed by Toshio Kuratomi
parent 4b27d08643
commit ef391a11ec
99 changed files with 251 additions and 250 deletions

View File

@@ -137,7 +137,7 @@ class OSXDefaults(object):
self.current_value = None
# Just set all given parameters
for key, val in kwargs.iteritems():
for key, val in kwargs.items():
setattr(self, key, val)
# Try to find the defaults executable

View File

@@ -286,7 +286,7 @@ def main():
(_, pre_rules, _) = module.run_command("grep '^### tuple' /lib/ufw/user*.rules")
# Execute commands
for (command, value) in commands.iteritems():
for (command, value) in commands.items():
cmd = [[ufw_bin], [module.check_mode, '--dry-run']]
if command == 'state':

View File

@@ -168,7 +168,7 @@ class Zfs(object):
if volblocksize:
cmd += ['-b', 'volblocksize']
if properties:
for prop, value in properties.iteritems():
for prop, value in properties.items():
cmd += ['-o', '%s="%s"' % (prop, value)]
if origin:
cmd.append(origin)
@@ -203,7 +203,7 @@ class Zfs(object):
def set_properties_if_changed(self):
current_properties = self.get_current_properties()
for prop, value in self.properties.iteritems():
for prop, value in self.properties.items():
if current_properties.get(prop, None) != value:
self.set_property(prop, value)
@@ -242,7 +242,7 @@ def main():
# Get all valid zfs-properties
properties = dict()
for prop, value in module.params.iteritems():
for prop, value in module.params.items():
# All freestyle params are zfs properties
if prop not in module.argument_spec:
# Reverse the boolification of freestyle zfs properties