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.

Note that six.text_type is "str" in Python 3, so we can remove the
clause completly.

Needed-By: https://review.opendev.org/701743
Change-Id: I7dbdf7b773d72db9204c6251b1ce561cf7675522
This commit is contained in:
Andreas Jaeger 2020-01-11 16:21:43 +01:00
parent 5623ab2e03
commit 3851110cc5
1 changed files with 1 additions and 2 deletions

View File

@ -15,7 +15,6 @@
from __future__ import absolute_import
import logging
import six
from django.conf import settings
@ -52,7 +51,7 @@ def _cleanup_params(attrs, create, **params):
raise exceptions.BadRequest(
"Key must be in %s" % ",".join(attrs))
if key == "labels":
if isinstance(value, str) or isinstance(value, six.text_type):
if isinstance(value, str):
labels = {}
vals = value.split(",")
for v in vals: