From 18f4af1a2378c8d41c4fbc7013549269c3b810be Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Thu, 26 Apr 2018 17:48:37 +0900 Subject: [PATCH] Fix unicode type judgment This patch changes judgment for "unicode" type to "six.text_type". Change-Id: I55869266338e61c10118d327ca51c463c0fa6ad4 --- magnum_ui/api/magnum.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magnum_ui/api/magnum.py b/magnum_ui/api/magnum.py index 9bdd5e32..839c96de 100644 --- a/magnum_ui/api/magnum.py +++ b/magnum_ui/api/magnum.py @@ -15,6 +15,7 @@ from __future__ import absolute_import import logging +import six from django.conf import settings @@ -50,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, unicode): + if isinstance(value, str) or isinstance(value, six.text_type): labels = {} vals = value.split(",") for v in vals: