The self._what["json"] value is passed as the value of
die_on_err argument
(positional-argument-wise), which makes every command running through this
method return with success.
Instead the value should be passed with the keyword, that is
exec_cmd(...json=self._what["json"]).
Fixes issue 196
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Slave/Job.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Slave/Job.py b/lnst/Slave/Job.py
index b4cdac44..1a1755fe 100644
--- a/lnst/Slave/Job.py
+++ b/lnst/Slave/Job.py
@@ -239,7 +239,7 @@ class GenericJob(object):
class ShellExecJob(GenericJob):
def run(self):
try:
- stdout, stderr = exec_cmd(self._what["command"],
self._what["json"])
+ stdout, stderr = exec_cmd(self._what["command"],
json=self._what["json"])
self._result["passed"] = True
self._result["res_data"] = {"stdout": stdout,
"stderr": stderr}
except ExecCmdFail as e:
--
2.21.3
_______________________________________________
LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...