diff --git a/.pylintrc b/.pylintrc index 4bcd2776a9..732deb4f04 100644 --- a/.pylintrc +++ b/.pylintrc @@ -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, diff --git a/openstack_dashboard/api/rest/keystone.py b/openstack_dashboard/api/rest/keystone.py index fe92389640..9c348d780a 100644 --- a/openstack_dashboard/api/rest/keystone.py +++ b/openstack_dashboard/api/rest/keystone.py @@ -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)