[elbe-devel] [PATCH 1/7] elbepack: shellhelper: propery log pathlike objects
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Apr 30 09:23:08 CEST 2024
The subprocess APIs allow the passing of pathlike objects.
Convert those to strings during logging.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/shellhelper.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elbepack/shellhelper.py b/elbepack/shellhelper.py
index d998e7c62ac4..f0d7a4a14306 100644
--- a/elbepack/shellhelper.py
+++ b/elbepack/shellhelper.py
@@ -23,7 +23,7 @@ def _log_cmd(cmd):
if _is_shell_cmd(cmd):
return cmd
else:
- return shlex.join(cmd)
+ return shlex.join(map(os.fspath, cmd))
def do(cmd, allow_fail=False, stdin=None, env_add=None, log_cmd=None):
--
2.44.0
More information about the elbe-devel
mailing list