Fix missing string format specifiers

There were a few instances in the code where string formatting was
missing the formatting type specifier.

Change-Id: I187447b1fc96b37d251a601613dde630d6d10ccc
This commit is contained in:
Sean McGinnis 2016-09-22 13:53:23 -05:00
parent a85f1eb62d
commit 6f66b8d91e
2 changed files with 4 additions and 3 deletions

View File

@ -309,7 +309,8 @@ class EMCVMAXProvision(object):
extraSpecs)
if rc != 0:
exceptionMessage = (_(
"Error removing volume %(vol)s from %(sg). %(error)s.")
"Error removing volume %(vol)s from %(sg)s. "
"%(error)s.")
% {'vol': volumeName,
'sg': storageGroupInstance['ElementName'],
'error': errorDesc})
@ -361,7 +362,7 @@ class EMCVMAXProvision(object):
extraSpecs)
if rc != 0:
exceptionMessage = (_(
"Error adding volume %(vol)s to %(sg). %(error)s.")
"Error adding volume %(vol)s to %(sg)s. %(error)s.")
% {'vol': volumeName,
'sg': storageGroupInstance['ElementName'],
'error': errordesc})

View File

@ -713,7 +713,7 @@ class ZFSSANFSDriver(nfs.NfsDriver):
size = int(math.ceil(float(
utils.get_file_size(local_vol_path)) / units.Gi))
except (OSError, ValueError):
err_msg = (_("Failed to get size of existing volume: %(vol). "
err_msg = (_("Failed to get size of existing volume: %(vol)s. "
"Volume Manage failed."), {'vol': existing_vol_name})
LOG.error(err_msg)
raise exception.VolumeBackendAPIException(data=err_msg)