From: Ondrej Lichtner <olichtne(a)redhat.com>
If the 'bg' parameter was specified with value False the task would
crash with "Argument not recognised", causing problems when the value is
passed as a variable. This commit fixes that by parsing and ignoring the
'bg' argument when it's value is False.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Task.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index 51a0333..178d774 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -254,6 +254,8 @@ class HostAPI(object):
if arg == "bg" and argval == True:
self._bg_id_seq += 1
cmd["bg_id"] = bg_id = self._bg_id_seq
+ elif arg == "bg" and argval == False:
+ continue
elif arg == "expect":
if str(argval) not in ["pass", "fail"]:
msg = "Unrecognised value of the expect attribute (%s)." \
--
2.9.0