From 4b2e5b574f3bbdf52018f7e920e26b02edf781fb Mon Sep 17 00:00:00 2001 From: "wei.ying" Date: Sat, 1 Jul 2017 15:33:08 +0800 Subject: [PATCH] Correct the wrong exceptions reference in domain tables.py This patch fixes a typo when referencing exception message handle function, the correct function should use the Horizon exceptions module instead of keystoneclient. Change-Id: Iaeabf3630351f13f6881b4df489c709fa3ef092f Closes-Bug: #1701782 --- openstack_dashboard/dashboards/identity/domains/tables.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/dashboards/identity/domains/tables.py b/openstack_dashboard/dashboards/identity/domains/tables.py index 6afc63b113..d0b43db2e1 100644 --- a/openstack_dashboard/dashboards/identity/domains/tables.py +++ b/openstack_dashboard/dashboards/identity/domains/tables.py @@ -21,8 +21,9 @@ from django.utils.http import urlencode from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy -from keystoneclient import exceptions +from keystoneclient import exceptions as keystoneclient_exceptions +from horizon import exceptions from horizon import messages from horizon import tables @@ -116,7 +117,7 @@ class DeleteDomainsAction(tables.DeleteAction): msg = _('Domain "%s" must be disabled before it can be deleted.') \ % domain.name messages.error(request, msg) - raise exceptions.ClientException(409, msg) + raise keystoneclient_exceptions.ClientException(409, msg) else: LOG.info('Deleting domain "%s".', obj_id) api.keystone.domain_delete(request, obj_id)