run_cmd() and friends: Make args a list[str]

This is a code maintenance commit: some run_xxx() helper functions
take a string, some a list, and some just digest all arguments and
pass them on as a list to exec() to be executed. That's highly
inconsistent. This commit changes that to list-only.

Except for the run_cmd() method of SSHClient, which is still run as a
shell method, because, erm, it's a shell. Might be changed in the
future for consistency reasons.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-26 15:55:52 +01:00
commit b81406e11a
12 changed files with 22 additions and 23 deletions

View file

@ -97,5 +97,5 @@ class SSHClientCmd(SSHClient): # export
self.__init_askpass()
cmd_arr = ['ssh']
cmd_arr.append(self.hostname)
stdout, stderr = await run_cmd('ssh', self.hostname, cmd)
stdout, stderr = await run_cmd(['ssh', self.hostname, cmd])
return stdout