libvirt: use correct translation format
Fix volume driver exceptions following the guidelines posted in http://docs.openstack.org/developer/oslo.i18n/guidelines.html TrivialFix Change-Id: If7037aafe8ce886ab51966b232ab65df3e8319dc
This commit is contained in:
parent
f729a1e815
commit
cd963109df
|
@ -1460,7 +1460,7 @@ class LibvirtScalityVolumeDriver(LibvirtBaseVolumeDriver):
|
|||
# config is mandatory
|
||||
config = CONF.libvirt.scality_sofs_config
|
||||
if not config:
|
||||
msg = _LW("Value required for 'scality_sofs_config'")
|
||||
msg = _("Value required for 'scality_sofs_config'")
|
||||
LOG.warn(msg)
|
||||
raise exception.NovaException(msg)
|
||||
|
||||
|
@ -1471,13 +1471,13 @@ class LibvirtScalityVolumeDriver(LibvirtBaseVolumeDriver):
|
|||
try:
|
||||
urllib.request.urlopen(config, timeout=5).close()
|
||||
except urllib.error.URLError as e:
|
||||
msg = _LW("Cannot access 'scality_sofs_config': %s") % e
|
||||
msg = _("Cannot access 'scality_sofs_config': %s") % e
|
||||
LOG.warn(msg)
|
||||
raise exception.NovaException(msg)
|
||||
|
||||
# mount.sofs must be installed
|
||||
if not os.access('/sbin/mount.sofs', os.X_OK):
|
||||
msg = _LW("Cannot execute /sbin/mount.sofs")
|
||||
msg = _("Cannot execute /sbin/mount.sofs")
|
||||
LOG.warn(msg)
|
||||
raise exception.NovaException(msg)
|
||||
|
||||
|
@ -1492,7 +1492,7 @@ class LibvirtScalityVolumeDriver(LibvirtBaseVolumeDriver):
|
|||
utils.execute('mount', '-t', 'sofs', config, mount_path,
|
||||
run_as_root=True)
|
||||
if not os.path.isdir(sysdir):
|
||||
msg = _LW("Cannot mount Scality SOFS, check syslog for errors")
|
||||
msg = _("Cannot mount Scality SOFS, check syslog for errors")
|
||||
LOG.warn(msg)
|
||||
raise exception.NovaException(msg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue