Skip to content

Commit 1224415

Browse files
authored
Merge pull request #464 from yungwine/node-args
fix getting multiple node args with same name
2 parents 5934918 + feaad6a commit 1224415

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
@@ -68,7 +68,7 @@ def inject_globals(func):
6868
console.AddItem("status", inject_globals(Status), "Print TON component status")
6969
console.AddItem("set_node_argument", inject_globals(set_node_argument), "Set node argument")
7070
console.AddItem("enable", inject_globals(Enable), "Enable some function")
71-
console.AddItem("update", inject_globals(Enable), "Update some function: 'JR' - jsonrpc. Example: 'update JR'")
71+
console.AddItem("update", inject_globals(Enable), "Update some function: 'JR' - jsonrpc. Example: 'update JR'")
7272
console.AddItem("plsc", inject_globals(PrintLiteServerConfig), "Print lite-server config")
7373
console.AddItem("clcf", inject_globals(CreateLocalConfigFile), "Create lite-server config file")
7474
console.AddItem("print_ls_proxy_config", inject_globals(print_ls_proxy_config), "Print ls-proxy config")
@@ -133,6 +133,8 @@ def Status(local, args):
133133
node_args = get_node_args()
134134
color_print("{cyan}===[ Node arguments ]==={endc}")
135135
for key, value in node_args.items():
136+
if len(value) == 0:
137+
print(f"{key}")
136138
for v in value:
137139
print(f"{key}: {v}")
138140
#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)