Remove str() before exc to make sure lazy translation work
Use of str() on an lazy translation enabled message may cause runtime failure. Change-Id: Ib38b146ae3188241b082fb446f26ea67704797af
This commit is contained in:
parent
aa9a6a6de1
commit
eee7d18c24
@ -61,7 +61,7 @@ class NestedStack(stack_resource.StackResource):
|
|||||||
raise ValueError(_("Could not fetch remote template '%(url)s': "
|
raise ValueError(_("Could not fetch remote template '%(url)s': "
|
||||||
"%(exc)s") %
|
"%(exc)s") %
|
||||||
{'url': self.properties[self.TEMPLATE_URL],
|
{'url': self.properties[self.TEMPLATE_URL],
|
||||||
'exc': str(r_exc)})
|
'exc': r_exc})
|
||||||
|
|
||||||
return template_format.parse(template_data)
|
return template_format.parse(template_data)
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ class NestedStack(stack_resource.StackResource):
|
|||||||
raise ValueError(_("Could not fetch remote template '%(url)s': "
|
raise ValueError(_("Could not fetch remote template '%(url)s': "
|
||||||
"%(exc)s") %
|
"%(exc)s") %
|
||||||
{'url': self.properties[self.TEMPLATE_URL],
|
{'url': self.properties[self.TEMPLATE_URL],
|
||||||
'exc': str(r_exc)})
|
'exc': r_exc})
|
||||||
|
|
||||||
template = template_format.parse(template_data)
|
template = template_format.parse(template_data)
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class VolumeExtendTask(object):
|
|||||||
if self.clients.client_plugin('cinder').is_client_exception(ex):
|
if self.clients.client_plugin('cinder').is_client_exception(ex):
|
||||||
raise exception.Error(_(
|
raise exception.Error(_(
|
||||||
"Failed to extend volume %(vol)s - %(err)s") % {
|
"Failed to extend volume %(vol)s - %(err)s") % {
|
||||||
'vol': vol.id, 'err': str(ex)})
|
'vol': vol.id, 'err': ex})
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user