diff options
author | M V P Nitesh <m.nitesh@nectechnologies.in> | 2017-03-30 18:36:25 +0530 |
---|---|---|
committer | M V P Nitesh <m.nitesh@nectechnologies.in> | 2017-03-30 18:37:24 +0530 |
commit | 978d3b43f3feac5a6013a1deec3db290fef71225 (patch) | |
tree | 7c18b6cb486a93b5a1da84ad131799663b6f27ba /barbicanclient/barbican.py | |
parent | f008a7b0c1124a289ff0c36eb5a816f221a32b35 (diff) | |
download | python-barbicanclient-978d3b43f3feac5a6013a1deec3db290fef71225.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: I093160f746f346871c136043a8fa48c9491fdc1a
Diffstat (limited to 'barbicanclient/barbican.py')
-rw-r--r-- | barbicanclient/barbican.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/barbicanclient/barbican.py b/barbicanclient/barbican.py index 3201d34..d52c199 100644 --- a/barbicanclient/barbican.py +++ b/barbicanclient/barbican.py @@ -30,7 +30,6 @@ from keystoneauth1.identity import v2 from keystoneauth1.identity import v3 from keystoneauth1 import loading from keystoneauth1 import session -import six import barbicanclient from barbicanclient import client @@ -122,7 +121,7 @@ class Barbican(app.App): } # Return a dictionary with only the populated (not None) values - return dict((k, v) for (k, v) in six.iteritems(kwargs) if v) + return dict((k, v) for (k, v) in kwargs.items() if v) def create_keystone_session( self, args, api_version, kwargs_dict, auth_type |