From 83ff2ae9e8827cdf646f75111697089ad2ebd8fb Mon Sep 17 00:00:00 2001 From: xuanyandong Date: Sat, 2 Jan 2021 10:09:25 +0800 Subject: [PATCH] Remove six from quota.py remove six in quota.py - six.string_type - six.integer_types Change-Id: I86bc7f14d7d9006e93b33f9453b5727c9bb26c8f --- cinder/quota.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cinder/quota.py b/cinder/quota.py index 24483e6c3c0..a8056313632 100644 --- a/cinder/quota.py +++ b/cinder/quota.py @@ -24,7 +24,6 @@ from oslo_log import log as logging from oslo_log import versionutils from oslo_utils import importutils from oslo_utils import timeutils -import six from cinder import context from cinder import db @@ -368,7 +367,7 @@ class DbQuotaDriver(object): # Set up the reservation expiration if expire is None: expire = CONF.reservation_expire - if isinstance(expire, six.integer_types): + if isinstance(expire, int): expire = datetime.timedelta(seconds=expire) if isinstance(expire, datetime.timedelta): expire = timeutils.utcnow() + expire @@ -847,7 +846,7 @@ class QuotaEngine(object): # Grab the current driver class from CONF self._quota_driver_class = CONF.quota_driver - if isinstance(self._quota_driver_class, six.string_types): + if isinstance(self._quota_driver_class, str): self._quota_driver_class = importutils.import_object( self._quota_driver_class)