Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2222 #2223

Merged
merged 1 commit into from
Dec 1, 2023
Merged

#2222 #2223

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import signal
import sys
import traceback
from typing import Union

from openapi_server import util
from typing import Iterator, TextIO, Any
Expand All @@ -28,7 +29,7 @@ def child_receive_sigpipe(signal_number, frame):
os._exit(0)


def _get_response(response_id: str) -> dict:
def _get_response(response_id: str) -> Union[dict, tuple]:
response_cache = ResponseCache()
return response_cache.get_response(response_id)

Expand Down Expand Up @@ -93,6 +94,8 @@ def get_response(response_id: str) -> Any: # noqa: E501
if do_fork:
read_fo = get_response_in_child_process(response_id)
resp_obj = json.load(read_fo)
if type(resp_obj) == list and len(resp_obj) == 2:
resp_obj = tuple(resp_obj)
else:
resp_obj = _get_response(response_id)
return resp_obj
Expand Down
Loading