Remove six usage

This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.

Needed-By: https://review.opendev.org/701743
Change-Id: If459ea9914274e3c93168748a949c96f72cf9254
This commit is contained in:
Andreas Jaeger 2020-01-11 16:12:36 +01:00 committed by Andreas Jaeger
parent acaf6d4dd2
commit a1dec849fc
2 changed files with 2 additions and 4 deletions

View File

@ -13,7 +13,6 @@
# under the License.
import json
import six
import yaml
from django.views import generic
@ -39,7 +38,7 @@ def _load_yaml(data):
loaded_data = yaml.safe_load(data)
except Exception as ex:
raise Exception(_('The specified input is not a valid '
'YAML format: %s') % six.text_type(ex))
'YAML format: %s') % str(ex))
return loaded_data

View File

@ -14,7 +14,6 @@
from __future__ import absolute_import
import logging
import six
from zaqarclient.queues import client as zaqar_client
from horizon import exceptions
@ -78,7 +77,7 @@ def queue_update(request, queue_name, metadata):
queue = zaqarclient(request).queue(queue_name, auto_create=False)
for key in RESERVED_QUEUE_METADATA:
if (key in metadata and isinstance(metadata[key], six.string_types)):
if (key in metadata and isinstance(metadata[key], str)):
metadata[key] = int(metadata[key])
queue.metadata(new_meta=metadata)