Fix HNAS driver exception messages

There are certain points in HNAS driver where the string
replacement variable is not being correctly used, thus
the default message is being overwritten when it should not.

TrivialFix

Change-Id: Id2b1a9a8002cf9fcc6a438a95f9329ac252a7956
This commit is contained in:
Rodrigo Barbieri 2016-04-15 13:44:47 -03:00
parent f63fe255ec
commit 4c7d9c45c5
2 changed files with 2 additions and 2 deletions

View File

@ -567,7 +567,7 @@ class HDSHNASDriver(driver.ShareDriver):
if share_size is None:
msg = (_("The share %s trying to be managed does not have a "
"quota limit, please set it before manage.") % share_id)
raise exception.ManageInvalidShare(msg)
raise exception.ManageInvalidShare(reason=msg)
path = self.hnas_evs_ip + ':/shares/' + share_id

View File

@ -114,7 +114,7 @@ class HNASSSHBackend(object):
if ('Cannot find any clonable files in the source directory' in
e.stderr):
msg = _("Source path %s is empty") % src_path
raise exception.HNASNothingToCloneException(msg)
raise exception.HNASNothingToCloneException(msg=msg)
else:
msg = six.text_type(e)
LOG.exception(msg)