From 24b8a7bab149896fa1ac372d0aca92a51aa6d787 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Tue, 18 Nov 2025 14:37:12 +0800 Subject: [PATCH] refactor: avoid using temp files in sandbox. --- apps/common/utils/tool_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/utils/tool_code.py b/apps/common/utils/tool_code.py index 4c764965b..24c1258a4 100644 --- a/apps/common/utils/tool_code.py +++ b/apps/common/utils/tool_code.py @@ -100,7 +100,7 @@ except Exception as e: result_line = [line for line in lines if line.startswith(_id)] if not result_line: raise Exception("No result found.") - result = json.loads(base64.b64decode(result_line[0].split(":", 1)[1]).decode()) + result = json.loads(base64.b64decode(result_line[-1].split(":", 1)[1]).decode()) if result.get('code') == 200: return result.get('data') raise Exception(result.get('msg'))