From 2ab521c0b3cffb60931b4ffd149e3f7b908e0fb3 Mon Sep 17 00:00:00 2001 From: frikky Date: Tue, 16 Jun 2020 08:58:21 +0200 Subject: [PATCH] Fixed App SDK bug with Splunk app --- backend/app_sdk/app_base.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 8bf5736b..386fbcda 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -489,11 +489,16 @@ class AppBase: # FIXME - this is horrible, but works for now #for i in range(calltimes): if not multiexecution: - print("Params: %s" % params) - print("RUNNING NORMAL EXECUTION") - result += await func(**params) + print("APP_SDK DONE: Starting normal execution of function") + newres = await func(**params) + print("NEWRES: ", newres) + if isinstance(newres, str): + result += newres + else: + print("Can't handle type %s value from function" % (type(newres))) + result += "Can't handle %s type from function" % type(newres) else: - print("MULTI EXECUTION: ", multi_parameters) + print("APP_SDK DONE: Starting multi execution with", multi_parameters) # 1. Use number of executions based on longest array # 2. Find the right value from the parsed multi_params