diff options
author | M V P Nitesh <m.nitesh@nectechnologies.in> | 2017-03-31 15:15:17 +0530 |
---|---|---|
committer | M V P Nitesh <m.nitesh@nectechnologies.in> | 2017-03-31 15:16:54 +0530 |
commit | 61aa092ce5cdee495e6faf63c36419e5583d3627 (patch) | |
tree | db02760894ea1da0f1489197470acad35d919b7c /heatclient/common/utils.py | |
parent | 954e475a6a0a12432ec325d7579460fabcf3f40a (diff) | |
download | python-heatclient-61aa092ce5cdee495e6faf63c36419e5583d3627.tar.gz |
Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I3913e8876b34e112140788d7a405da6eedfb5f29
Diffstat (limited to 'heatclient/common/utils.py')
-rw-r--r-- | heatclient/common/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/heatclient/common/utils.py b/heatclient/common/utils.py index 013e692..c9d1ec0 100644 --- a/heatclient/common/utils.py +++ b/heatclient/common/utils.py @@ -376,7 +376,7 @@ def format_parameter_file(param_files, template_file=None, template_file, template_url)) param_file = {} - for key, value in six.iteritems(params): + for key, value in params.items(): param_file[key] = resolve_param_get_file(value, template_base_url) return param_file |