From e420a6fbdc800bc95cba982b511677ce2345b057 Mon Sep 17 00:00:00 2001 From: "Han Verstraete (OpenFaaS Ltd)" Date: Thu, 11 Jan 2024 14:27:16 +0100 Subject: [PATCH] Fix undefined variable in python3-http-debian template Functions useing the http-debian tamplate where failing. The format_response function used an undefined variable 'resp' this should be 'res'. Signed-off-by: Han Verstraete (OpenFaaS Ltd) --- template/python3-http-debian/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/python3-http-debian/index.py b/template/python3-http-debian/index.py index 74340ba..b241d9b 100644 --- a/template/python3-http-debian/index.py +++ b/template/python3-http-debian/index.py @@ -58,7 +58,7 @@ def format_response(res): if res == None: return ('', 200) - if type(resp) is dict: + if type(res) is dict: statusCode = format_status_code(res) content_type = get_content_type(res) body = format_body(res, content_type)