Skip to content

Commit feaad6a

Browse files
committed
fix getting multiple node args with same name
1 parent 4f66db8 commit feaad6a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mytoninstaller/mytoninstaller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def inject_globals(func):
6969
console.AddItem("status", inject_globals(Status), "Print TON component status")
7070
console.AddItem("set_node_argument", inject_globals(set_node_argument), "Set node argument")
7171
console.AddItem("enable", inject_globals(Enable), "Enable some function")
72-
console.AddItem("update", inject_globals(Enable), "Update some function: 'JR' - jsonrpc. Example: 'update JR'")
72+
console.AddItem("update", inject_globals(Enable), "Update some function: 'JR' - jsonrpc. Example: 'update JR'")
7373
console.AddItem("plsc", inject_globals(PrintLiteServerConfig), "Print lite-server config")
7474
console.AddItem("clcf", inject_globals(CreateLocalConfigFile), "Create lite-server config file")
7575
console.AddItem("print_ls_proxy_config", inject_globals(print_ls_proxy_config), "Print ls-proxy config")
@@ -132,6 +132,8 @@ def Status(local, args):
132132
node_args = get_node_args()
133133
color_print("{cyan}===[ Node arguments ]==={endc}")
134134
for key, value in node_args.items():
135+
if len(value) == 0:
136+
print(f"{key}")
135137
for v in value:
136138
print(f"{key}: {v}")
137139
#end define

mytoninstaller/node_args.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def get_node_args(start_command: str = None):
2525
for item in node_args:
2626
if item.startswith('-'):
2727
key = item
28-
result[key] = list()
28+
if key not in result:
29+
result[key] = []
2930
else:
3031
result[key].append(item)
3132
return result

0 commit comments

Comments
 (0)