Skip to content

Commit 8636bf3

Browse files
committed
Fix pylint issue and add return statements for error handling
1 parent eb37fdd commit 8636bf3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins/action/server_info.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@ def run(self, tmp=None, task_vars=None):
2828
connection_type = self._play_context.connection
2929
if not connection_type or not connection_type.endswith(".mcp"):
3030
result["failed"] = True
31-
result["msg"] = "Connection type %s is not valid for server_info module, "
32-
"please use fully qualified name of MCP connection type." % connection_type
31+
result["msg"] = (
32+
"Connection type %s is not valid for server_info module, "
33+
"please use fully qualified name of MCP connection type."
34+
) % connection_type
35+
return result
3336

3437
# Get socket path from connection
3538
socket_path = self._connection.socket_path
3639
if socket_path is None:
3740
result["failed"] = True
3841
result["msg"] = "socket_path is not available from connection"
42+
return result
3943

4044
try:
4145
# Use Connection class to call server_info on the connection plugin

0 commit comments

Comments
 (0)