aboutsummaryrefslogtreecommitdiff
path: root/kolla/cmd
diff options
context:
space:
mode:
authorting.wang <ting.wang@easystack.cn>2016-01-16 13:02:00 +0800
committerting.wang <ting.wang@easystack.cn>2016-01-16 13:44:16 +0800
commitdefd70cef9108ed186b35b02bdf56f71945d41fc (patch)
treed7e42a41b89d0e5a46114024c3b2b7f96581dbd8 /kolla/cmd
parenta755aa88e4454b2b4540c7b1e48f3e6d4e963edb (diff)
downloadkolla-defd70cef9108ed186b35b02bdf56f71945d41fc.tar.gz
kolla-defd70cef9108ed186b35b02bdf56f71945d41fc.zip
Use dict.items() for adding Python 3 compatibility
Replacing dict.iteritems()/.itervalues() with six.iteritems(dict)/six.itervalues(dict) was preferred in the past, but there was a discussion suggesting to avoid six for this. ref: http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Partially implements: blueprint python3 Change-Id: Ie931bc02f558f6db3677b44f645eb3bdf78ccae8
Diffstat (limited to 'kolla/cmd')
-rwxr-xr-xkolla/cmd/build.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index db417499b..e7c54a435 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -488,7 +488,7 @@ class KollaWorker(object):
if self.image_statuses_bad:
LOG.info("Images that failed to build")
LOG.info("===========================")
- for name, status in six.iteritems(self.image_statuses_bad):
+ for name, status in self.image_statuses_bad.items():
LOG.error('%s Failed with status: %s', name, status)
if self.image_statuses_unmatched:
@@ -583,7 +583,7 @@ class KollaWorker(object):
for image in self.images:
sort_images[image['fullname']] = image
- for parent_name, parent in six.iteritems(sort_images):
+ for parent_name, parent in sort_images.items():
for image in sort_images.values():
if image['parent_name'] == parent_name:
parent['children'].append(image)