commit 3863a6596b229f724a52985b8a7ab3de6e041f7b
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Fri Apr 12 12:20:03 2013 +0200
NetTestCommand: use the new disable_logging method
The NetTestCommand object only disabled the recipe handler and the
connection handler. This was incorrect as it ment that the logs from
commands wouldn't be saved on the slave machine. Also when there were
multiple commands running they would be accessing the tty without
synchronization which is probably not correct.
This commit changes the behaviour by calling the disable_logging method
which clears all the handlers to files, tty or sockets. And after
creates a new connection handler that forwards the log messages to the
main server process.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
lnst/Common/NetTestCommand.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py
index b5569a5..57a9350 100644
--- a/lnst/Common/NetTestCommand.py
+++ b/lnst/Common/NetTestCommand.py
@@ -107,9 +107,8 @@ class NetTestCommand:
self._connection_pipe = self._write_pipe
- self._log_ctl.unset_recipe()
- self._log_ctl.cancel_connection()
- self._log_ctl.set_connection(self._write_pipe)
+ self._log_ctl.disable_logging()
+ self._log_ctl.set_connection(self._connection_pipe)
result = {}
try: