diff --git a/openstack_dashboard/api/neutron.py b/openstack_dashboard/api/neutron.py index 1478a6f85a..9d91bda4d9 100644 --- a/openstack_dashboard/api/neutron.py +++ b/openstack_dashboard/api/neutron.py @@ -1091,7 +1091,7 @@ def servers_update_addresses(request, servers, all_tenants=False): ports_floating_ips, network_names) except Exception as e: - LOG.error(e) + LOG.error(six.text_type(e)) else: server.addresses = addresses diff --git a/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py index 46311f1ac0..ab32ddc79f 100644 --- a/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py +++ b/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py @@ -21,6 +21,7 @@ import logging import operator from oslo_utils import units +import six from django.template.defaultfilters import filesizeformat # noqa from django.utils.text import normalize_newlines # noqa @@ -688,7 +689,8 @@ class CustomizeAction(workflows.Action): except Exception as e: msg = _('There was a problem parsing the' ' %(prefix)s: %(error)s') - msg = msg % {'prefix': prefix, 'error': e} + msg = msg % {'prefix': prefix, + 'error': six.text_type(e)} raise forms.ValidationError(msg) return script else: diff --git a/openstack_dashboard/dashboards/project/stacks/forms.py b/openstack_dashboard/dashboards/project/stacks/forms.py index 1980aa55c2..dccdacfbf5 100644 --- a/openstack_dashboard/dashboards/project/stacks/forms.py +++ b/openstack_dashboard/dashboards/project/stacks/forms.py @@ -191,7 +191,7 @@ class TemplateForm(forms.SelfHandlingForm): except Exception as e: msg = _('There was a problem parsing the' ' %(prefix)s: %(error)s') - msg = msg % {'prefix': prefix, 'error': e} + msg = msg % {'prefix': prefix, 'error': six.text_type(e)} raise forms.ValidationError(msg) cleaned[data_str] = tpl