pylint: fix raising-non-exception error
django.http.HttpResponseNotFound is not an exception. Django recommends to return it. @rest_utils.ajax can handle it. Change-Id: I26f82da022a2c2725d62cc136c5da8eafc0ac26f
This commit is contained in:
parent
136a3e1dea
commit
a984ae43e5
@ -13,7 +13,6 @@ disable=
|
||||
method-hidden,
|
||||
no-member,
|
||||
not-callable,
|
||||
raising-non-exception,
|
||||
# "W" Warnings for stylistic problems or minor programming issues
|
||||
arguments-differ,
|
||||
attribute-defined-outside-init,
|
||||
|
@ -135,7 +135,7 @@ class User(generic.View):
|
||||
This method returns HTTP 204 (no content) on success.
|
||||
"""
|
||||
if id == 'current':
|
||||
raise django.http.HttpResponseNotFound('current')
|
||||
return django.http.HttpResponseNotFound('current')
|
||||
api.keystone.user_delete(request, id)
|
||||
|
||||
@rest_utils.ajax(data_required=True)
|
||||
@ -255,7 +255,7 @@ class Role(generic.View):
|
||||
This method returns HTTP 204 (no content) on success.
|
||||
"""
|
||||
if id == 'default':
|
||||
raise django.http.HttpResponseNotFound('default')
|
||||
return django.http.HttpResponseNotFound('default')
|
||||
api.keystone.role_delete(request, id)
|
||||
|
||||
@rest_utils.ajax(data_required=True)
|
||||
@ -355,7 +355,7 @@ class Domain(generic.View):
|
||||
This method returns HTTP 204 (no content) on success.
|
||||
"""
|
||||
if id == 'default':
|
||||
raise django.http.HttpResponseNotFound('default')
|
||||
return django.http.HttpResponseNotFound('default')
|
||||
api.keystone.domain_delete(request, id)
|
||||
|
||||
@rest_utils.ajax(data_required=True)
|
||||
|
Loading…
Reference in New Issue
Block a user