diff options
author | Walter Doekes <walter+github@wjd.nu> | 2019-11-01 15:34:41 +0100 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2020-05-02 00:48:14 +0000 |
commit | df92b1113d6e00af05b5f06d0c10a39875bbbde6 (patch) | |
tree | 355ec472d8a3b98099df5e16aacf6035030410ca | |
parent | 524093e3e30cc8f64aecebedb51704584401087d (diff) | |
download | horizon-df92b1113d6e00af05b5f06d0c10a39875bbbde6.tar.gz |
Give keystoneauth1.ClientException only 1 argument (message)
Change-Id: I970b07e52ed7f2f4440b47800fcb3b6528dce22d
(cherry picked from commit 941f64915e825dedc2c58621e8390953bfcc4b7b)
-rw-r--r-- | openstack_auth/tests/unit/test_auth.py | 2 | ||||
-rw-r--r-- | openstack_dashboard/api/keystone.py | 4 | ||||
-rw-r--r-- | openstack_dashboard/dashboards/identity/domains/tables.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/openstack_auth/tests/unit/test_auth.py b/openstack_auth/tests/unit/test_auth.py index a668f2a7f..60a4a0786 100644 --- a/openstack_auth/tests/unit/test_auth.py +++ b/openstack_auth/tests/unit/test_auth.py @@ -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() diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index cbf2da107..afa014854 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -436,7 +436,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: @@ -454,7 +454,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) diff --git a/openstack_dashboard/dashboards/identity/domains/tables.py b/openstack_dashboard/dashboards/identity/domains/tables.py index 8c0dbf725..7fb879f96 100644 --- a/openstack_dashboard/dashboards/identity/domains/tables.py +++ b/openstack_dashboard/dashboards/identity/domains/tables.py @@ -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) |