Add exception message when user modify password same as previous
When user change password same as previous password,then user get
an error message "Unable to change password" on Horizon which
does not specify the clear reason why it cannot be change.
This patch corrects the exception raised.
Closes-Bug:
@@ -69,9 +69,9 @@ class PasswordForm(forms.SelfHandlingForm):
msg = _("Password changed. Please log in again to continue.")
utils.add_logout_reason(request, response, msg)
return response
- except Exception:
+ except Exception as ex:
exceptions.handle(request,
- _('Unable to change password.'))
+ _('Unable to change password: %s') % ex)
return False
else:
messages.error(request, _('Changing password is not supported.'))
