Skip to content

Commit fe26a98

Browse files
Copilotpontemonti
andcommitted
Remove unnecessary hasattr check in exception handler
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
1 parent dba9456 commit fe26a98

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services

libraries/microsoft-agents-a365-tooling-extensions-agentframework/microsoft_agents_a365/tooling/extensions/agentframework/services/mcp_tool_registration_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,8 @@ async def add_tool_servers_to_agent(
133133
self._logger.info(f"Added MCP plugin '{server_name}' to agent tools")
134134

135135
except Exception as tool_ex:
136-
server_name = config.mcp_server_name if hasattr(config, "mcp_server_name") else "Unknown"
137136
self._logger.warning(
138-
f"Failed to create MCP plugin for {server_name}: {tool_ex}"
137+
f"Failed to create MCP plugin for {config.mcp_server_name}: {tool_ex}"
139138
)
140139
continue
141140

0 commit comments

Comments
 (0)