From d82690f0d931a0ff9092cd5138cb99cd2198c341 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 21 Apr 2021 13:31:11 -0400 Subject: [PATCH] Fix python3-ism python2 doesn't understand how to return an iterator from within an iterator. --- confluent_server/confluent/httpapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/httpapi.py b/confluent_server/confluent/httpapi.py index ea163554..e18c69c5 100644 --- a/confluent_server/confluent/httpapi.py +++ b/confluent_server/confluent/httpapi.py @@ -463,7 +463,8 @@ def wsock_handler(ws): def resourcehandler(env, start_response): try: if 'HTTP_SEC_WEBSOCKET_VERSION' in env: - return wsock_handler(env, start_response) + for rsp in wsock_handler(env, start_response): + yield rsp for rsp in resourcehandler_backend(env, start_response): yield rsp except Exception as e: