ExecContext: Fix output handling #9

Merged
Jan Lindemann merged 5 commits from jan/fix/20260610-lib-execcontext-put-fix-forgotten-input into master 2026-06-10 13:08:29 +02:00 AGit

2026-06-10

lib.ExecContext._put(): Fix forgotten input
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m12s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m22s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m10s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m22s
CI / Packaging test (push) Successful in 0s
_put() doesn't put: An empty stdin is passed to tee, a regression
introduced with 6db73873e7, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-10 12:56:05 +02:00
lib.ExecContext._put(): Clean up temporary file
_put() can leave temporary files behind if one of its shell commands
fails, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-10 12:55:58 +02:00
lib.ExecContext|.Distro: Ignore stdout_str newline
Ignore newline at the end of Result.stdout_str if only one line of
output is wanted from an executed shell command. The output of both
uname and mktemp are used wrongly in that regard.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-10 12:55:39 +02:00
lib.Result.__repr__(): Fix binary stdout exception
__repr__() tries to decode binary stdout as string and fails without
a backup. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-10 12:55:31 +02:00
lib.Result.__repr__() Fix missing f-qualifier
__repr__() tries to format a variable in an f-string without "f". Fix
that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-10 12:55:20 +02:00