mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 03:01:06 -03:30
move code linting to a stricter pep8-esque auto-formatting tool, black
This commit is contained in:
@@ -47,9 +47,11 @@ def handle_error(request, status=404, **kwargs):
|
||||
# browsable error page for browser clients or a simple JSON response for any
|
||||
# other clients.
|
||||
if request.path.startswith('/api/'):
|
||||
|
||||
class APIException(exceptions.APIException):
|
||||
status_code = status
|
||||
default_detail = kwargs['content']
|
||||
|
||||
api_error_view = ApiErrorView.as_view(exception_class=APIException)
|
||||
response = api_error_view(request)
|
||||
if hasattr(response, 'render'):
|
||||
|
||||
Reference in New Issue
Block a user