From d1eac95cda5288f8692d09b5625cbd46f3c107ee Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Thu, 29 Oct 2020 16:17:18 +0100 Subject: [PATCH] Use shlex_quote for complete --foo=bar argument. Without that, the resulting string is `--foo="'bar'"` which results in `'bar'` being passed to Koji task. With this commit, the resulting string is `"'--foo=bar'"` which results in `bar` being passed to Koji which is expected. Signed-off-by: Jan Kaluza --- pungi/wrappers/kojiwrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pungi/wrappers/kojiwrapper.py b/pungi/wrappers/kojiwrapper.py index 201991c4..115863e1 100644 --- a/pungi/wrappers/kojiwrapper.py +++ b/pungi/wrappers/kojiwrapper.py @@ -197,7 +197,7 @@ class KojiWrapper(object): cmd.append(k) else: for arg in force_list(v): - cmd.append("%s=%s" % (k, shlex_quote(arg))) + cmd.append(shlex_quote("%s=%s" % (k, arg))) return cmd @@ -235,7 +235,7 @@ class KojiWrapper(object): cmd.append(k) else: for arg in force_list(v): - cmd.append("%s=%s" % (k, shlex_quote(arg))) + cmd.append(shlex_quote("%s=%s" % (k, arg))) return cmd