summaryrefslogtreecommitdiff
path: root/keystoneclient/discover.py
diff options
context:
space:
mode:
authorM V P Nitesh <m.nitesh@nectechnologies.in>2017-04-03 18:20:15 +0530
committerM V P Nitesh <m.nitesh@nectechnologies.in>2017-04-03 18:20:52 +0530
commit46b9e429a2cbfcd1d898616c177538a9283997d3 (patch)
treed26fc8b13a0b0276c2ee7d9d7c6a7b154d6ac186 /keystoneclient/discover.py
parentcfd33730868350cd475e45569a8c1573803a6895 (diff)
downloadpython-keystoneclient-46b9e429a2cbfcd1d898616c177538a9283997d3.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: I18a6890935ebdbb589269379f21a0dd47d07eb3a
Diffstat (limited to 'keystoneclient/discover.py')
-rw-r--r--keystoneclient/discover.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/keystoneclient/discover.py b/keystoneclient/discover.py
index 6b9a167..dbd721c 100644
--- a/keystoneclient/discover.py
+++ b/keystoneclient/discover.py
@@ -16,7 +16,6 @@ import warnings
from debtcollector import removals
from keystoneauth1 import plugin
from positional import positional
-import six
from keystoneclient import _discover
from keystoneclient import exceptions
@@ -300,7 +299,7 @@ class Discover(_discover.Discover):
raise exceptions.DiscoveryFailure(msg)
# kwargs should take priority over stored kwargs.
- for k, v in six.iteritems(self._client_kwargs):
+ for k, v in self._client_kwargs.items():
kwargs.setdefault(k, v)
# restore the url to either auth_url or endpoint depending on what