diff options
author | Riccardo Pittau <elfosardo@gmail.com> | 2019-11-29 10:16:28 +0100 |
---|---|---|
committer | Riccardo Pittau <elfosardo@gmail.com> | 2019-12-23 09:38:25 +0100 |
commit | 78c121a5d7b6efc84d541ea4de98aa910255884e (patch) | |
tree | f60d0b75107c58f14ed99f81ef9c6831ecb2feea /ironic/drivers/modules/redfish/utils.py | |
parent | 67f5a6bf5c8922a56d70daae023a004e672a88db (diff) | |
download | ironic-78c121a5d7b6efc84d541ea4de98aa910255884e.tar.gz |
Stop using six library
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: Ib546f16965475c32b2f8caabd560e2c7d382ac5a
Diffstat (limited to 'ironic/drivers/modules/redfish/utils.py')
-rw-r--r-- | ironic/drivers/modules/redfish/utils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ironic/drivers/modules/redfish/utils.py b/ironic/drivers/modules/redfish/utils.py index 69be60918..fbf0a3b55 100644 --- a/ironic/drivers/modules/redfish/utils.py +++ b/ironic/drivers/modules/redfish/utils.py @@ -15,6 +15,7 @@ import collections import os +from urllib import parse as urlparse from oslo_log import log from oslo_utils import excutils @@ -22,8 +23,6 @@ from oslo_utils import importutils from oslo_utils import strutils import retrying import rfc3986 -import six -from six.moves import urllib from ironic.common import exception from ironic.common.i18n import _ @@ -111,7 +110,7 @@ def parse_driver_info(node): {'address': address, 'node': node.uuid}) try: - system_id = urllib.parse.quote(driver_info['redfish_system_id']) + system_id = urlparse.quote(driver_info['redfish_system_id']) except (TypeError, AttributeError): raise exception.InvalidParameterValue( _('Invalid value "%(value)s" set in ' @@ -123,7 +122,7 @@ def parse_driver_info(node): # Check if verify_ca is a Boolean or a file/directory in the file-system verify_ca = driver_info.get('redfish_verify_ca', True) - if isinstance(verify_ca, six.string_types): + if isinstance(verify_ca, str): if os.path.isdir(verify_ca) or os.path.isfile(verify_ca): pass else: |