From 6a79d6b5b634b9efdb002f547ab3eb2d104bff85 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 3 Aug 2026 16:09:13 +0000 Subject: [PATCH] fix: ops dict declared at top of loop, remove duplicate --- sources/python/main.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sources/python/main.py b/sources/python/main.py index 1274849..db86c10 100644 --- a/sources/python/main.py +++ b/sources/python/main.py @@ -144,6 +144,7 @@ def main(): n = 2 node_map = {} + ops = {} for name in undeployed: print(f" [{n}] Deploy {name} (port {cfg[name].get('port','?')})") node_map[str(n)] = name @@ -170,15 +171,7 @@ def main(): str(nc.get("upstream_port","80")), "", nc.get("mode","monitoring")) deployed.add(name) - # Track what number each action got - ops = {} - if deployed: - ops['edit'] = str(n); n += 1 - ops['del'] = str(n); n += 1 - ops['status'] = str(n); n += 1 - ops['tunnel'] = str(n); n += 1 - - if c == ops.get('edit') and deployed: + elif c == ops.get('edit') and deployed: edit_nodes() elif c == ops.get('del') and deployed: remove_menu()