diff options
author | wangzihao <wangzihao@yovole.com> | 2020-10-16 10:40:22 +0800 |
---|---|---|
committer | wangzihao <wangzihao@yovole.com> | 2020-10-16 10:40:22 +0800 |
commit | e9541846936cec27b70f3975eba837cf938af21d (patch) | |
tree | 5f707da6fc9f7e61eeb888d1353116d464446b17 /trove/configuration | |
parent | 9e2515aad353c0ad6ced3558c6cc0fcd6d478fff (diff) | |
download | trove-e9541846936cec27b70f3975eba837cf938af21d.tar.gz |
Remove six usage and basestring check
Remove basestring check.
Remove six Replace the following items with Python 3 style code.
- six.string_types
- six.int2byte
- six.indexbytes
- six.add_metaclass
- six.StringIO
- six.text_type
- six.integer_types
- six.binary_type
- six.BytesIO
- six.reraise
Change-Id: I4fb9033d152963c504ceb4d5c4d08f934ee4accb
Diffstat (limited to 'trove/configuration')
-rw-r--r-- | trove/configuration/service.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/trove/configuration/service.py b/trove/configuration/service.py index 18ec05c3..7cd6576d 100644 --- a/trove/configuration/service.py +++ b/trove/configuration/service.py @@ -14,7 +14,6 @@ # under the License. from oslo_log import log as logging -import six from trove.cluster import models as cluster_models import trove.common.apischema as apischema @@ -307,7 +306,7 @@ class ConfigurationsController(wsgi.Controller): raise exception.UnprocessableEntity(message=msg) # integer min/max checking - if isinstance(v, six.integer_types) and not isinstance(v, bool): + if isinstance(v, int) and not isinstance(v, bool): if rule.min_size is not None: try: min_value = int(rule.min_size) @@ -345,9 +344,9 @@ class ConfigurationsController(wsgi.Controller): if value_type == "boolean": return bool elif value_type == "string": - return six.string_types + return str elif value_type == "integer": - return six.integer_types + return int elif value_type == "float": return float else: |