Fix exception message of CoraidESMConfigureError
Since 'message' is the same name as the second argument to the constructor of CinderException, 'message="Oorah"' is not a keyword argument. Therefore, "message = _('ESM configure request failed: %(message)s.')" doesn't work correctly. Then, remove the redundant period. Change-Id: Iafc457197fc3993f9f942babcdda0cd79b7bd518 Closes-Bug: #1290627
This commit is contained in:
parent
7c2d6fed70
commit
657b5106c3
|
@ -594,11 +594,11 @@ class CoraidESMBadGroup(CoraidException):
|
|||
|
||||
|
||||
class CoraidESMConfigureError(CoraidException):
|
||||
message = _('ESM configure request failed: %(message)s.')
|
||||
message = _('ESM configure request failed: %(reason)s')
|
||||
|
||||
|
||||
class CoraidESMNotAvailable(CoraidException):
|
||||
message = _('Coraid ESM not available with reason: %(reason)s.')
|
||||
message = _('Coraid ESM not available with reason: %(reason)s')
|
||||
|
||||
|
||||
# Zadara
|
||||
|
|
|
@ -241,10 +241,10 @@ class CoraidAppliance(object):
|
|||
if self._is_bad_config_state(reply):
|
||||
# Calculate error message
|
||||
if not reply:
|
||||
message = _('Reply is empty.')
|
||||
reason = _('Reply is empty.')
|
||||
else:
|
||||
message = reply.get('message', _('Error message is empty.'))
|
||||
raise exception.CoraidESMConfigureError(message=message)
|
||||
reason = reply.get('message', _('Error message is empty.'))
|
||||
raise exception.CoraidESMConfigureError(reason=reason)
|
||||
return reply
|
||||
|
||||
def esm_command(self, request):
|
||||
|
|
Loading…
Reference in New Issue