Browse Source

Merge "Give keystoneauth1.ClientException only 1 argument (message)" into stable/train

tags/16.2.0^0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
fa839516e5
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      openstack_auth/tests/unit/test_auth.py
  2. +2
    -2
      openstack_dashboard/api/keystone.py
  3. +1
    -1
      openstack_dashboard/dashboards/identity/domains/tables.py

+ 1
- 1
openstack_auth/tests/unit/test_auth.py View File

@@ -376,7 +376,7 @@ class OpenStackAuthTestsV3(OpenStackAuthTestsMixin,
def test_exception(self):
user = self.data.user
form_data = self.get_form_data(user)
exc = keystone_exceptions.ClientException(500)
exc = keystone_exceptions.ClientException('error 500')
self._mock_client_password_auth_failure(user.name, user.password, exc)
self.mox.ReplayAll()



+ 2
- 2
openstack_dashboard/api/keystone.py View File

@@ -440,7 +440,7 @@ def user_update(request, user, **data):

if not keystone_can_edit_user():
raise keystone_exceptions.ClientException(
405, _("Identity service does not allow editing user data."))
_("Identity service does not allow editing user data."))
try:
user = manager.update(user, **data)
except keystone_exceptions.Conflict:
@@ -458,7 +458,7 @@ def user_update_password(request, user, password, admin=True):

if not keystone_can_edit_user():
raise keystone_exceptions.ClientException(
405, _("Identity service does not allow editing user password."))
_("Identity service does not allow editing user password."))

manager = keystoneclient(request, admin=admin).users
manager.update(user, password=password)


+ 1
- 1
openstack_dashboard/dashboards/identity/domains/tables.py View File

@@ -116,7 +116,7 @@ class DeleteDomainsAction(tables.DeleteAction):
msg = _('Domain "%s" must be disabled before it can be deleted.') \
% domain.name
messages.error(request, msg)
raise keystoneclient_exceptions.ClientException(409, msg)
raise keystoneclient_exceptions.ClientException(msg)
else:
LOG.info('Deleting domain "%s".', obj_id)
api.keystone.domain_delete(request, obj_id)


Loading…
Cancel
Save