From: Satheesh Rajendran <sathn...@linux.vnet.ibm.com>

This patch addresses the following github issue
https://github.com/autotest/autotest/issues/473

Signed-off-by: Satheesh Rajendran <sathn...@linux.vnet.ibm.com>
---
 client/virt/libvirt_vm.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
index 9a06f05..b0e029d 100644
--- a/client/virt/libvirt_vm.py
+++ b/client/virt/libvirt_vm.py
@@ -1524,10 +1524,8 @@ class VM(virt_vm.BaseVM):
             filename = "/var/run/libvirt/qemu/%s.pid" % self.name
             if not self.params.get("type") == "unattended_install":
                 if os.path.exists(filename):
-                    self.process = int(open(filename).read())
-            children = commands.getoutput("ps --ppid=%d -o pid=" %
-                                          self.process.get_pid()).split()
-            return int(children[0])
+                    vm_pid = int(open(filename).read())
+            return vm_pid
         except (TypeError, IndexError, ValueError):
             return None
 
-- 
1.7.5.4

_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to