fix: ops dict declared at top of loop, remove duplicate
This commit is contained in:
parent
30d247c411
commit
6a79d6b5b6
1 changed files with 2 additions and 9 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue