Removed dict.iteritems() in several other files.

This is for py3 compatibility #18506
This commit is contained in:
Andrea Tartaglia 2016-12-13 15:47:08 +00:00 committed by Toshio Kuratomi
parent 7c71c678fa
commit 59227d8c31
13 changed files with 31 additions and 31 deletions

View file

@ -158,7 +158,7 @@ class AnsibleCloudStack(object):
def has_changed(self, want_dict, current_dict, only_keys=None):
result = False
for key, value in want_dict.iteritems():
for key, value in want_dict.items():
# Optionally limit by a list of keys
if only_keys and key not in only_keys:
@ -581,12 +581,12 @@ class AnsibleCloudStack(object):
if resource:
returns = self.common_returns.copy()
returns.update(self.returns)
for search_key, return_key in returns.iteritems():
for search_key, return_key in returns.items():
if search_key in resource:
self.result[return_key] = resource[search_key]
# Bad bad API does not always return int when it should.
for search_key, return_key in self.returns_to_int.iteritems():
for search_key, return_key in self.returns_to_int.items():
if search_key in resource:
self.result[return_key] = int(resource[search_key])