From 6cdcd230105376e0269916900e5fe8e50f2b48b2 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 16 Apr 2026 19:41:04 +0200 Subject: [PATCH] lib.ec.ssh.Exec._run_ssh(): Fix interactivity translation cmd_input is passed as None to _run(), which is legal, but then used in a call to cmd_run(), which is a public API and, hence, illegal. InputMode.NonInteractive should be used instead, do that. Signed-off-by: Jan Lindemann --- src/python/jw/pkg/lib/ec/ssh/Exec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/jw/pkg/lib/ec/ssh/Exec.py b/src/python/jw/pkg/lib/ec/ssh/Exec.py index c53362e4..d980d7d0 100644 --- a/src/python/jw/pkg/lib/ec/ssh/Exec.py +++ b/src/python/jw/pkg/lib/ec/ssh/Exec.py @@ -41,4 +41,6 @@ class Exec(Base): async def _run_ssh(self, cmd: list[str], cmd_input: bytes|None, *args, **kwargs) -> Result: self.__init_askpass() + if cmd_input is None: + cmd_input = InputMode.Interactive if self.interactive else InputMode.NonInteractive return await run_cmd(['ssh', self.hostname, join_cmd(cmd)], cmd_input=cmd_input, throw=False)