drop use of six

Change-Id: I40bb06d1d445d8eb8281f421a94d7dead2a89872
This commit is contained in:
Hervé Beraud 2020-03-02 14:58:28 +01:00
parent 64b78b7878
commit 2245235ece
3 changed files with 2 additions and 5 deletions

View File

@ -9,6 +9,5 @@ openstackdocstheme==1.20.0
openstacksdk==0.31.1
oslotest==3.2.0
reno==2.5.0
six==1.10.0
Sphinx==1.8.0
stestr==1.0.0

View File

@ -17,7 +17,6 @@ from keystoneauth1 import loading
from openstack import connection
from oslo_config import cfg
from oslo_log import log
import six
from oslo_limit import exception
from oslo_limit import opts
@ -110,7 +109,7 @@ class Enforcer(object):
:raises exception.ClaimExceedsLimit: when over limits
"""
if not project_id or not isinstance(project_id, six.string_types):
if not project_id or not isinstance(project_id, str):
msg = 'project_id must be a non-empty string.'
raise ValueError(msg)
if not isinstance(deltas, dict) or len(deltas) == 0:
@ -118,7 +117,7 @@ class Enforcer(object):
raise ValueError(msg)
for k, v in deltas.items():
if not isinstance(k, six.string_types):
if not isinstance(k, str):
raise ValueError('resource name is not a string.')
elif not isinstance(v, int):
raise ValueError('resource limit is not an integer.')

View File

@ -2,7 +2,6 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
keystoneauth1>=3.9.0 # Apache-2.0
six>=1.10.0 # MIT
oslo.config>=5.2.0 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.log>=3.44.0 # Apache-2.0