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 <r1chardj0n3s@gmail.com>
This commit is contained in:
Victor Stinner 2015-10-06 15:22:19 +02:00
parent 892179ac1b
commit d02c92dcfa

@ -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: