From d02c92dcfae4c6bfab8002acbe123c122b739be0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Oct 2015 15:22:19 +0200 Subject: [PATCH] py3: Replace unicode with six.text_type Run the unicode operation of the sixer tool on openstack_dashboard/ directory. tox.ini: Add the following tests to Python 3.4: * openstack_dashboard.contrib.sahara.content.data_processing.data_sources.tests * openstack_dashboard.contrib.sahara.content.data_processing.job_binaries.tests * openstack_dashboard.contrib.sahara.content.data_processing.jobs.tests * openstack_dashboard.dashboards.project.networks.tests Partial-Implements: blueprint porting-python3 Change-Id: Ibfe52ccbccc30e6b1d59137c68942c9860805397 Co-Authored-By: Richard Jones --- .../contrib/trove/content/database_clusters/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/contrib/trove/content/database_clusters/views.py b/openstack_dashboard/contrib/trove/content/database_clusters/views.py index b66c2791..817c1ae1 100644 --- a/openstack_dashboard/contrib/trove/content/database_clusters/views.py +++ b/openstack_dashboard/contrib/trove/content/database_clusters/views.py @@ -24,6 +24,8 @@ from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ +import six + from horizon import exceptions from horizon import forms as horizon_forms from horizon import tables as horizon_tables @@ -54,7 +56,8 @@ class IndexView(horizon_tables.DataTableView): flavors = [] msg = _('Unable to retrieve database size information.') exceptions.handle(self.request, msg) - return OrderedDict((unicode(flavor.id), flavor) for flavor in flavors) + return OrderedDict((six.text_type(flavor.id), flavor) + for flavor in flavors) def _extra_data(self, cluster): try: