diff options
author | wangzihao <wangzihao@yovole.com> | 2020-10-12 19:30:57 +0800 |
---|---|---|
committer | wangzihao <wangzihao@yovole.com> | 2020-10-13 11:02:06 +0800 |
commit | 17d2d5175e322519da96c41c761027e49c10c766 (patch) | |
tree | f8b336d26b6699f0069d5eea70126a02ae2a24fa /troveclient/compat | |
parent | dfb45e2b663008e4c4901417ff8d3e9966bae11d (diff) | |
download | python-troveclient-17d2d5175e322519da96c41c761027e49c10c766.tar.gz |
Remove six
Remove all usages of six.
Change-Id: I6ea8d1cdc3060d5c2a4311c7454b66ba75109b0c
Diffstat (limited to 'troveclient/compat')
-rw-r--r-- | troveclient/compat/auth.py | 3 | ||||
-rw-r--r-- | troveclient/compat/common.py | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/troveclient/compat/auth.py b/troveclient/compat/auth.py index 1a331bc..b7882b6 100644 --- a/troveclient/compat/auth.py +++ b/troveclient/compat/auth.py @@ -11,7 +11,6 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -import six from troveclient.compat import exceptions @@ -19,7 +18,7 @@ def get_authenticator_cls(cls_or_name): """Factory method to retrieve Authenticator class.""" if isinstance(cls_or_name, type): return cls_or_name - elif isinstance(cls_or_name, six.string_types): + elif isinstance(cls_or_name, str): if cls_or_name == "keystone": return KeyStoneV3Authenticator elif cls_or_name == "auth1.1": diff --git a/troveclient/compat/common.py b/troveclient/compat/common.py index ec7854f..2d2676c 100644 --- a/troveclient/compat/common.py +++ b/troveclient/compat/common.py @@ -17,9 +17,8 @@ import json import optparse import os import pickle -import six -from six.moves.urllib import parse import sys +from urllib import parse from troveclient.compat import client from troveclient.compat import exceptions @@ -44,7 +43,7 @@ def check_for_exceptions(resp, body): def print_actions(cmd, actions): """Print help for the command with list of options and description.""" print("Available actions for '%s' cmd:" % cmd) - for k, v in six.iteritems(actions): + for k, v in actions.items(): print("\t%-20s%s" % (k, v.__doc__)) sys.exit(2) @@ -53,7 +52,7 @@ def print_commands(commands): """Print the list of available commands and description.""" print("Available commands") - for k, v in six.iteritems(commands): + for k, v in commands.items(): print("\t%-20s%s" % (k, v.__doc__)) sys.exit(2) |