commit c914e1d25dce80ab14734bcb5685dc47451ba398
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Thu Apr 18 19:51:54 2013 +0200
lnst-slave: Fixing bug with packet capture
There was a problem with the packet capture feature. The files were
deleted, but not removed from the list, so when you executed a different
test, the slave tried to delete the files again which resulted in an
exception.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
lnst/Slave/NetTestSlave.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index aac7a82..f4549f6 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -162,10 +162,12 @@ class SlaveMethods:
return True
def _remove_capture_files(self):
- for name in self._capture_files.itervalues():
+ for key, name in self._capture_files.iteritems():
logging.debug("Removing temporary packet capture file %s", name)
os.unlink(name)
+ self._capture_files.clear()
+
def _update_system_config(self, options, persistent):
system_config = self._system_config
for option, values in options.iteritems():
Show replies by thread