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
This commit is contained in:
wei.ying 2017-07-01 15:33:08 +08:00
parent 8cf9fae418
commit 4b2e5b574f
1 changed files with 3 additions and 2 deletions

View File

@ -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)