From 3851110cc5816a5d9edd2dee0c14d190fe3db5f2 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 11 Jan 2020 16:21:43 +0100 Subject: [PATCH] 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 --- magnum_ui/api/magnum.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/magnum_ui/api/magnum.py b/magnum_ui/api/magnum.py index aed85689..0fc3567e 100644 --- a/magnum_ui/api/magnum.py +++ b/magnum_ui/api/magnum.py @@ -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: