From: Ondrej Lichtner <olichtne(a)redhat.com>
This commit adds the {get, set}_result_sent methods, and a new attribute
(_result_sent) to the NetTestCommand class. This attribute is used to
indicate that the result of a command was already sent to the
Controller. The set method takes an optional parameter 'value' that can
be used to set the attribute to False if needed (not currently used).
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Common/NetTestCommand.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py
index 0ce8998..9ffd876 100644
--- a/lnst/Common/NetTestCommand.py
+++ b/lnst/Common/NetTestCommand.py
@@ -99,6 +99,7 @@ class NetTestCommand:
self._result = None
self._log_ctl = log_ctl
self._start_time = None
+ self._result_sent = False
if "bg_id" not in self._command:
self._id = None
@@ -111,6 +112,12 @@ class NetTestCommand:
def forked(self):
return self._process != None
+ def set_result_sent(self, value=True):
+ self._result_sent = value
+
+ def get_result_sent(self):
+ return self._result_sent
+
def finished(self):
return self._finished
--
2.5.0