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:
parent
acaf6d4dd2
commit
a1dec849fc
@ -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
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user