diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2022-02-17 11:37:13 +0000 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2022-03-21 18:31:10 +0000 |
commit | fa137a5bf1f2a86cc15ebc4d973f245e1543105d (patch) | |
tree | 1aa5f0d23479ead227f319d2751df2372215a6ce /swiftclient/shell.py | |
parent | 4983b909831b72b5361aadf573cadd3afaaf8976 (diff) | |
download | python-swiftclient-fa137a5bf1f2a86cc15ebc4d973f245e1543105d.tar.gz |
Remove six
This mostly affects tests. Nothing too complicated
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iabc78f651e1d48db35638280722f8019798eccd6
Diffstat (limited to 'swiftclient/shell.py')
-rwxr-xr-x | swiftclient/shell.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py index 36d0757..a16de88 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -25,8 +25,7 @@ import warnings from os import environ, walk, _exit as os_exit from os.path import isfile, isdir, join -from six import text_type, PY2 -from six.moves.urllib.parse import unquote, urlparse +from urllib.parse import unquote, urlparse from sys import argv as sys_argv, exit, stderr, stdin from time import gmtime, strftime @@ -191,10 +190,6 @@ def st_delete(parser, args, output_manager, return_parser=False): for o, err in r.get('result', {}).get('Errors', []): # o will be of the form quote("/<cont>/<obj>") o = unquote(o) - if PY2: - # In PY3, unquote(unicode) uses utf-8 like we - # want, but PY2 uses latin-1 - o = o.encode('latin-1').decode('utf-8') output_manager.error('Error Deleting: {0}: {1}' .format(o[1:], err)) try: @@ -1931,7 +1926,7 @@ def add_default_args(parser): def main(arguments=None): argv = sys_argv if arguments is None else arguments - argv = [a if isinstance(a, text_type) else a.decode('utf-8') for a in argv] + argv = [a if isinstance(a, str) else a.decode('utf-8') for a in argv] parser = argparse.ArgumentParser( add_help=False, formatter_class=HelpFormatter, usage=''' |