Skip to content

Commit 25b8bd1

Browse files
author
cinjospeh
committed
fix format problem
1 parent f982145 commit 25b8bd1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dbgpt/agent/expand/tool_assistant_agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def _get_tools_by_resource(resource: Optional[Resource]) -> Optional[List[BaseTo
9191
tools.append(resource)
9292
elif resource.type() == ResourceType.Pack:
9393
for sub_res in resource.sub_resources:
94-
tools.extend(_get_tools_by_resource(sub_res))
94+
res_list = _get_tools_by_resource(sub_res)
95+
if res_list is not None and len(res_list) > 0:
96+
tools.extend(_get_tools_by_resource(sub_res))
9597

9698
return tools

0 commit comments

Comments
 (0)