From 1737080b82d43683307f2d640b1c9b0929718e9c Mon Sep 17 00:00:00 2001 From: poka Date: Sun, 10 Sep 2023 11:33:31 +0200 Subject: [PATCH] fix command with no args --- jaklis.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jaklis.py b/jaklis.py index 68c20ec..2c871e6 100755 --- a/jaklis.py +++ b/jaklis.py @@ -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())