From 3ee3aa2ffe6a256605f06ac37de3f84ceeffe4d1 Mon Sep 17 00:00:00 2001 From: Adrian Sevcenco Date: Sat, 11 May 2024 20:12:15 +0300 Subject: [PATCH] fix args passed to InitConnection when no token is found --- alienpy/alien.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alienpy/alien.py b/alienpy/alien.py index 4a12e05..a6bc938 100755 --- a/alienpy/alien.py +++ b/alienpy/alien.py @@ -1851,7 +1851,7 @@ def ProcessCommandChain(wb: Optional[WebSocketClientProtocol], cmd_chain: Union[ else: if wb is None: # If not prezent init connection and if command is token-init (without help being invoked) then use usercert - wb = InitConnection(wb, args, use_usercert = (cmd == 'token-init' and not is_help(args)), cmdlist_func = constructCmdList) + wb = InitConnection(wb, args if cmd == 'token-init' else [], use_usercert = (cmd == 'token-init' and not is_help(args)), cmdlist_func = constructCmdList) ALIENPY_GLOBAL_WB = wb args.append('-nokeys') # Disable return of the keys. ProcessCommandChain is used for user-based communication so json keys are not needed ret_obj = ProcessInput(wb, cmd, args, pipe_to_shell_cmd)