Skip to content

Commit bc6b241

Browse files
committed
quart.py : remove status code handler
1 parent 706bde2 commit bc6b241

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

aikido_zen/sources/quart.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from aikido_zen.context import get_current_context
22
from .functions.asgi_middleware import InternalASGIMiddleware
3-
from .functions.request_handler import request_handler
43
from ..helpers.get_argument import get_argument
54
from ..sinks import on_import, patch_function, before_async
65

@@ -34,21 +33,6 @@ async def _handle_request_before(func, instance, args, kwargs):
3433
context.cookies = request.cookies.to_dict()
3534
context.set_as_current_context()
3635

37-
38-
async def _handle_request_after(func, instance, args, kwargs):
39-
# pylint:disable=import-outside-toplevel # We don't want to install this by default
40-
from werkzeug.exceptions import HTTPException
41-
42-
try:
43-
response = await func(*args, **kwargs)
44-
if hasattr(response, "status_code"):
45-
request_handler(stage="post_response", status_code=response.status_code)
46-
return response
47-
except HTTPException as e:
48-
request_handler(stage="post_response", status_code=e.code)
49-
raise e
50-
51-
5236
@on_import("quart.app", "quart")
5337
def patch(m):
5438
"""
@@ -58,4 +42,3 @@ def patch(m):
5842
"""
5943
patch_function(m, "Quart.asgi_app", _asgi_app)
6044
patch_function(m, "Quart.handle_request", _handle_request_before)
61-
patch_function(m, "Quart.handle_request", _handle_request_after)

0 commit comments

Comments
 (0)