Remove six
Python 2 is no longer supported, thus usage of six can be removed.
Change-Id: I60259f7b326ac862409b4d8a0591859a0f070e8b
diff --git a/ironic_tempest_plugin/services/baremetal/base.py b/ironic_tempest_plugin/services/baremetal/base.py
index 3c52fcd..2acad18 100644
--- a/ironic_tempest_plugin/services/baremetal/base.py
+++ b/ironic_tempest_plugin/services/baremetal/base.py
@@ -11,10 +11,11 @@
# under the License.
+import functools
+from http import client as http_client
+from urllib import parse as urllib_parse
+
from oslo_serialization import jsonutils as json
-import six
-from six.moves import http_client
-from six.moves.urllib import parse as urllib
from tempest.lib.common import api_version_utils
from tempest.lib.common import rest_client
@@ -36,7 +37,7 @@
def handle_errors(f):
"""A decorator that allows to ignore certain types of errors."""
- @six.wraps(f)
+ @functools.wraps(f)
def wrapper(*args, **kwargs):
param_name = 'ignore_errors'
ignored_errors = kwargs.get(param_name, tuple())
@@ -149,7 +150,7 @@
"""
uri = self._get_uri(resource, permanent=permanent)
if kwargs:
- uri += "?%s" % urllib.urlencode(kwargs)
+ uri += "?%s" % urllib_parse.urlencode(kwargs)
resp, body = self.get(uri, headers=headers,
extra_headers=extra_headers)