Remove six from nfs/remotefs drivers

Remove two uses of six.text_type.

Change-Id: I11a540977528922b0554c7cfe2ed035aaadf0dc0
This commit is contained in:
Eric Harney 2023-11-15 12:04:44 -05:00
parent ea33c26634
commit 607386ad91
2 changed files with 2 additions and 4 deletions

View File

@ -26,7 +26,6 @@ from oslo_concurrency import processutils as putils
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import units
import six
from cinder import context
from cinder import coordination
@ -227,7 +226,7 @@ class NfsDriver(remotefs.RemoteFSSnapDriverDistributed):
'%(count)d attempts.',
{'share': nfs_share,
'count': num_attempts})
raise exception.NfsException(six.text_type(e))
raise exception.NfsException(str(e))
LOG.debug('Mount attempt %(attempt)d failed: %(exc)s.\n'
'Retrying mount ...',
{'attempt': attempt, 'exc': e})

View File

@ -37,7 +37,6 @@ from oslo_serialization import jsonutils
from oslo_utils import imageutils
from oslo_utils.secretutils import md5
from oslo_utils import units
import six
from cinder import compute
from cinder import context
@ -1037,7 +1036,7 @@ class RemoteFSSnapDriverBase(RemoteFSDriver):
Returns string in a hex format.
"""
if isinstance(base_str, six.text_type):
if isinstance(base_str, str):
base_str = base_str.encode('utf-8')
return md5(base_str, usedforsecurity=False).hexdigest()