Skip to content

Commit b23b80a

Browse files
committed
refacto
1 parent 27e3f6e commit b23b80a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

httpdbg/hooks/http.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ def set_hook_for_http_server_handle_one_request(records: HTTPRecords, method: Ca
1515
def hook(self, *args, **kwargs):
1616
from httpdbg.webapp.app import HttpbgHTTPRequestHandler
1717

18-
# the group label/full_label will be updated when the endpoint method will be called
19-
if not isinstance(self, HttpbgHTTPRequestHandler):
18+
if isinstance(self, HttpbgHTTPRequestHandler):
19+
# this request is for the httpdbg web server itself, we do have to create a group
20+
ret = method(self, *args, **kwargs)
21+
else:
22+
# the group label/full_label will be updated when the endpoint method will be called
2023
with httpdbg_group(records, "one request", ""):
2124
ret = method(self, *args, **kwargs)
22-
else:
23-
# this request is for the httpdbg web server itself, we can ignore it
24-
ret = method(self, *args, **kwargs)
2525

2626
return ret
2727

0 commit comments

Comments
 (0)