Remove six
We don't need this in a Python 3-only world Change-Id: I2f2cff3c291b5db53287a99b8044e162c2d8f47d
This commit is contained in:
parent
d237a3ed06
commit
5ce1ea5f28
|
@ -13,7 +13,6 @@
|
|||
# under the License.
|
||||
|
||||
import logging
|
||||
import six
|
||||
import yaml
|
||||
|
||||
from kolla_cli.api.exceptions import InvalidArgument
|
||||
|
@ -66,8 +65,7 @@ class PropertyApi(object):
|
|||
# string to a property. without this safe_load will turn
|
||||
# an empty string into a None which is different than an
|
||||
# empty string.
|
||||
if isinstance(original_value, six.string_types)\
|
||||
and value is None:
|
||||
if isinstance(original_value, str) and value is None:
|
||||
value = ''
|
||||
if current_property.value is None:
|
||||
current_property_type = None
|
||||
|
|
|
@ -21,7 +21,6 @@ import yaml
|
|||
|
||||
from cliff.command import Command
|
||||
from cliff.lister import Lister
|
||||
from six.moves import input
|
||||
|
||||
from kolla_cli.api.client import ClientApi
|
||||
from kolla_cli.api.exceptions import ClientException
|
||||
|
|
|
@ -18,7 +18,6 @@ import grp
|
|||
import logging
|
||||
import os
|
||||
import pwd
|
||||
import six
|
||||
import subprocess # nosec
|
||||
import time
|
||||
import yaml
|
||||
|
@ -129,7 +128,7 @@ def convert_to_unicode(the_string):
|
|||
"""
|
||||
if the_string is None:
|
||||
return the_string
|
||||
return six.u(the_string)
|
||||
return the_string
|
||||
|
||||
|
||||
def run_cmd(cmd, print_output=True):
|
||||
|
@ -422,7 +421,7 @@ def safe_decode(obj_to_decode):
|
|||
new_obj[key] = value
|
||||
else:
|
||||
new_obj = obj_to_decode
|
||||
if not isinstance(obj_to_decode, six.text_type):
|
||||
if not isinstance(obj_to_decode, str):
|
||||
# object is not unicode
|
||||
new_obj = obj_to_decode.decode('utf-8')
|
||||
return new_obj
|
||||
|
@ -478,7 +477,7 @@ def check_arg(param, param_name, expected_type, none_ok=False, empty_ok=False,
|
|||
# None arg
|
||||
raise MissingArgument(param_name)
|
||||
|
||||
if ((isinstance(param, six.string_types) or
|
||||
if ((isinstance(param, str) or
|
||||
isinstance(param, dict) or
|
||||
isinstance(param, list)) and
|
||||
not param and not empty_ok):
|
||||
|
@ -490,7 +489,7 @@ def check_arg(param, param_name, expected_type, none_ok=False, empty_ok=False,
|
|||
return
|
||||
# normalize expected string types for py2 and py3
|
||||
if expected_type is str:
|
||||
expected_type = six.string_types
|
||||
expected_type = str
|
||||
|
||||
if not isinstance(param, expected_type):
|
||||
# wrong type
|
||||
|
|
|
@ -86,7 +86,6 @@ restructuredtext-lint==1.1.3
|
|||
rfc3986==1.2.0
|
||||
setuptools==21.0.0
|
||||
simplejson==3.13.2
|
||||
six==1.10.0
|
||||
smmap2==2.0.3
|
||||
snowballstemmer==1.2.1
|
||||
Sphinx==1.6.2
|
||||
|
|
|
@ -9,5 +9,4 @@ jsonpickle>=0.9 # BSD
|
|||
oslo.i18n>=3.20.0 # Apache-2.0
|
||||
paramiko>=2.6.0 # LGPL
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
six>=1.10.0 # MIT
|
||||
docker>=2.4.2 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue