Using six to fix python2/3 compatible
Change-Id: I405284808be78082e96d077ba11a59534affba12
This commit is contained in:
parent
eb5a03ee72
commit
673f501fc9
|
@ -407,7 +407,7 @@ class Wizard(generic_views.PageTitleMixin, views.ModalFormMixin, LazyWizard):
|
|||
messages.success(self.request, message)
|
||||
|
||||
if do_redirect:
|
||||
return http.HttpResponseRedirect(bytes(env_url))
|
||||
return http.HttpResponseRedirect(six.text_type(env_url))
|
||||
else:
|
||||
srv_id = getattr(srv, '?')['id']
|
||||
return self.create_hacked_response(
|
||||
|
|
|
@ -29,6 +29,7 @@ from horizon.utils import filters
|
|||
from muranoclient.common import exceptions as exc
|
||||
from openstack_dashboard import policy
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
|
||||
from muranodashboard import api as api_utils
|
||||
from muranodashboard.api import packages as pkg_api
|
||||
|
@ -379,7 +380,7 @@ class DeployThisEnvironment(tables.Action):
|
|||
redirect=reverse('horizon:app-catalog:environments:index'))
|
||||
redirect_to = reverse('horizon:app-catalog:environments:services',
|
||||
args=(environment_id,))
|
||||
return django_http.HttpResponseRedirect(bytes(redirect_to))
|
||||
return django_http.HttpResponseRedirect(six.text_type(redirect_to))
|
||||
|
||||
|
||||
class ShowEnvironmentServices(tables.LinkAction):
|
||||
|
|
|
@ -309,7 +309,7 @@ class ImportBundleWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
|
|||
msg = _('Bundle successfully imported.')
|
||||
LOG.info(msg)
|
||||
messages.success(self.request, msg)
|
||||
return http.HttpResponseRedirect(bytes(redirect))
|
||||
return http.HttpResponseRedirect(six.text_type(redirect))
|
||||
|
||||
|
||||
class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
|
||||
|
@ -408,7 +408,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
|
|||
msg = _('Package parameters successfully updated.')
|
||||
LOG.info(msg)
|
||||
messages.success(self.request, msg)
|
||||
return http.HttpResponseRedirect(bytes(redirect))
|
||||
return http.HttpResponseRedirect(six.text_type(redirect))
|
||||
|
||||
def _handle_exception(self, original_e):
|
||||
exc_info = sys.exc_info()
|
||||
|
|
Loading…
Reference in New Issue