diff --git a/cinderclient/apiclient/base.py b/cinderclient/apiclient/base.py index 37cfaf100..cdf06c849 100644 --- a/cinderclient/apiclient/base.py +++ b/cinderclient/apiclient/base.py @@ -293,7 +293,7 @@ class CrudManager(BaseManager): def _filter_kwargs(self, kwargs): """Drop null values and handle ids.""" - for key, ref in six.iteritems(kwargs.copy()): + for key, ref in kwargs.copy().items(): if ref is None: kwargs.pop(key) else: @@ -489,7 +489,7 @@ class Resource(RequestIdMixin): return None def _add_details(self, info): - for (k, v) in six.iteritems(info): + for (k, v) in info.items(): try: try: setattr(self, k, v) diff --git a/cinderclient/apiclient/exceptions.py b/cinderclient/apiclient/exceptions.py index 565c47e8a..71146c90f 100644 --- a/cinderclient/apiclient/exceptions.py +++ b/cinderclient/apiclient/exceptions.py @@ -23,8 +23,6 @@ Exception definitions. import inspect import sys -import six - class ClientException(Exception): """The base exception class for all exceptions this library raises. @@ -396,7 +394,7 @@ class HttpVersionNotSupported(HttpServerError): # _code_map contains all the classes that have http_status attribute. _code_map = dict( (getattr(obj, 'http_status', None), obj) - for name, obj in six.iteritems(vars(sys.modules[__name__])) + for name, obj in vars(sys.modules[__name__]).items() if inspect.isclass(obj) and getattr(obj, 'http_status', False) ) diff --git a/cinderclient/auth_plugin.py b/cinderclient/auth_plugin.py index 2101b93bf..f6efb0ba9 100644 --- a/cinderclient/auth_plugin.py +++ b/cinderclient/auth_plugin.py @@ -17,8 +17,6 @@ import logging import pkg_resources -import six - from cinderclient import exceptions from cinderclient import utils @@ -51,7 +49,7 @@ def load_auth_system_opts(parser): This function will try to populate the parser with options from the available plugins. """ - for name, auth_plugin in six.iteritems(_discovered_plugins): + for name, auth_plugin in _discovered_plugins.items(): add_opts_fn = getattr(auth_plugin, "add_opts", None) if add_opts_fn: group = parser.add_argument_group("Auth-system '%s' options" % diff --git a/cinderclient/utils.py b/cinderclient/utils.py index 31e94448a..78adbd904 100644 --- a/cinderclient/utils.py +++ b/cinderclient/utils.py @@ -211,7 +211,7 @@ def print_dict(d, property="Property", formatters=None): pt.align = 'l' formatters = formatters or {} - for r in six.iteritems(d): + for r in d.items(): r = list(r) if r[0] in formatters: diff --git a/cinderclient/v3/pools.py b/cinderclient/v3/pools.py index 2f7260588..5303f8422 100644 --- a/cinderclient/v3/pools.py +++ b/cinderclient/v3/pools.py @@ -15,8 +15,6 @@ """Pools interface (v3 extension)""" -import six - from cinderclient import base @@ -45,7 +43,7 @@ class PoolManager(base.Manager): # be attributes of the pool itself. for pool in pools: if hasattr(pool, 'capabilities'): - for k, v in six.iteritems(pool.capabilities): + for k, v in pool.capabilities.items(): setattr(pool, k, v) # Remove the capabilities dictionary since all of its