Skip to content

Commit 8faff92

Browse files
authored
chore: remove redundant code in unregister_toolgroup (llamastack#3092)
# What does this PR do? removes redundant code ## Test Plan ci
1 parent a4bad6c commit 8faff92

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llama_stack/core/routing_tables/toolgroups.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@ async def register_tool_group(
124124
return toolgroup
125125

126126
async def unregister_toolgroup(self, toolgroup_id: str) -> None:
127-
tool_group = await self.get_tool_group(toolgroup_id)
128-
if tool_group is None:
129-
raise ToolGroupNotFoundError(toolgroup_id)
130-
await self.unregister_object(tool_group)
127+
await self.unregister_object(await self.get_tool_group(toolgroup_id))
131128

132129
async def shutdown(self) -> None:
133130
pass

0 commit comments

Comments
 (0)