fix command with no args

This commit is contained in:
poka 2023-09-10 11:33:31 +02:00
parent 56f5972ad0
commit 1737080b82
1 changed files with 10 additions and 2 deletions

View File

@ -373,7 +373,11 @@ keyPath = False if dunikey else createTmpDunikey()
def handle_cesium_commands(args, cmd, cesium):
# Get args of the command
cmd_args = list(zip(*list(commands[cmd]["arguments"].keys())))[1]
cmd_args = (
list(zip(*list(commands[cmd]["arguments"].keys())))[1]
if len(commands[cmd]["arguments"].keys()) > 0
else []
)
cmd_args_dict = {arg: args_dict[arg] for arg in cmd_args if arg in args_dict}
cmd_args_values = list(cmd_args_dict.values())
@ -435,7 +439,11 @@ def handle_cesium_commands(args, cmd, cesium):
def handle_gva_commands(args, cmd, gva):
# Get args of the command
cmd_args = list(zip(*list(commands[cmd]["arguments"].keys())))[1]
cmd_args = (
list(zip(*list(commands[cmd]["arguments"].keys())))[1]
if len(commands[cmd]["arguments"].keys()) > 0
else []
)
cmd_args_dict = {arg: args_dict[arg] for arg in cmd_args if arg in args_dict}
# cmd_args_values = list(cmd_args_dict.values())