summaryrefslogtreecommitdiff
path: root/glance_store/driver.py
diff options
context:
space:
mode:
authorliyou01 <liyou01@inspur.com>2021-01-07 15:57:43 +0800
committerCyril Roelandt <cyril@redhat.com>2022-05-25 04:42:06 +0200
commit5ff06df97fbd78f6781793c35801a4c989a515f1 (patch)
treee81f73b2d062ebccd0a3ed8e8ab20f545dffca5c /glance_store/driver.py
parentaeee48b561ba0d100663311c3ba94f0d128105aa (diff)
downloadglance_store-5ff06df97fbd78f6781793c35801a4c989a515f1.tar.gz
Remove Python 2 support
Python 2 has been deprecated for almost two years, and has not been guaranteed to work with glance_store for a while. This patch removes all traces of six, unicode strings and Python 2 tweaks. Co-Authored-By: Cyril Roelandt <cyril@redhat.com> Change-Id: Ifa78924d7ecf4f2d9a54c677888ab2926530c487
Diffstat (limited to 'glance_store/driver.py')
-rw-r--r--glance_store/driver.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/glance_store/driver.py b/glance_store/driver.py
index b11012a..9f85c7c 100644
--- a/glance_store/driver.py
+++ b/glance_store/driver.py
@@ -24,7 +24,6 @@ from oslo_config import cfg
from oslo_utils import encodeutils
from oslo_utils import importutils
from oslo_utils import units
-import six
from glance_store import capabilities
from glance_store import exceptions
@@ -93,7 +92,7 @@ class Store(capabilities.StoreCapability):
self.configure_add()
except exceptions.BadStoreConfiguration as e:
self.unset_capabilities(capabilities.BitMasks.WRITE_ACCESS)
- msg = (_(u"Failed to configure store correctly: %s "
+ msg = (_("Failed to configure store correctly: %s "
"Disabling add method.")
% encodeutils.exception_to_unicode(e))
LOG.warning(msg)
@@ -257,8 +256,7 @@ def back_compat_add(store_add_fun):
# everything is present, including hashing_algo
back_compat_required = False
elif ('hashing_algo' in kwargs or
- (num_args >= p_algo + 1 and isinstance(args[p_algo],
- six.string_types))):
+ (num_args >= p_algo + 1 and isinstance(args[p_algo], str))):
# there is a hashing_algo argument present
back_compat_required = False
else: