From 6e3383de72a47dc728972e6d87295ce25a6231ef Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 16 Jun 2021 19:33:16 +0200 Subject: [PATCH] Convert numeric command arguments to string (fixes #77) The input argument cmd_args is a list which may contain numeric elements. Convert all elements to strings before passing them to functions which expect str data type. Signed-off-by: Stefan Weil --- podman_compose.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index 976d641..7cd0055 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -705,7 +705,7 @@ class Podman: return subprocess.check_output(cmd_ls) def run(self, podman_args, cmd='', cmd_args=None, wait=True, sleep=1, obj=None): - cmd_args = cmd_args or [] + cmd_args = list(map(str, cmd_args or [])) xargs = self.compose.get_podman_args(cmd) if cmd else [] cmd_ls = [self.podman_path, *podman_args, cmd] + xargs + cmd_args print(" ".join(cmd_ls))