Sometimes it tried to kill an already terminated process which can cause
a traceback. This patch fixes the problem.

Signed-off-by: Yolkfull Chow <[email protected]>
---
 client/profilers/kvm_stat/kvm_stat.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/client/profilers/kvm_stat/kvm_stat.py 
b/client/profilers/kvm_stat/kvm_stat.py
index 7568a03..59d6ff6 100644
--- a/client/profilers/kvm_stat/kvm_stat.py
+++ b/client/profilers/kvm_stat/kvm_stat.py
@@ -51,7 +51,10 @@ class kvm_stat(profiler.profiler):
 
         @param test: Autotest test on which this profiler will operate on.
         """
-        os.kill(self.pid, 15)
+        try:
+            os.kill(self.pid, 15)
+        except OSError:
+            pass
 
 
     def report(self, test):
-- 
1.7.0.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to