mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
fix(typing): resolve mypy errors in agent node lifecycle tools
This commit is contained in:
5 files changed
+18
-9
No files matched your search
@@ -136,7 +136,11 @@ class GNS3StartNodeTool(BaseTool):
|
||||
results = []
|
||||
known_ids = [nid for nid in node_ids if nid in nodes_by_id]
|
||||
start_results = start_node_handler({"project_id": project_id, "node_ids": known_ids}, gns3_ctx)
|
||||
start_errors = {r["node_id"]: r.get("error") for r in start_results if r.get("status") == "error"}
|
||||
start_errors = (
|
||||
{r["node_id"]: r.get("error") for r in start_results if r.get("status") == "error"}
|
||||
if isinstance(start_results, list)
|
||||
else {}
|
||||
)
|
||||
|
||||
# Get immediate status (likely 'starting' or 'stopped') — one call
|
||||
listing = get_nodes_handler({"project_id": project_id}, gns3_ctx)
|
||||
|
||||
Reference in new issue
Block a user