You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tashi-commits@incubator.apache.org by st...@apache.org on 2012/03/15 20:38:45 UTC

svn commit: r1301186 - /incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py

Author: stroucki
Date: Thu Mar 15 20:38:44 2012
New Revision: 1301186

URL: http://svn.apache.org/viewvc?rev=1301186&view=rev
Log:
qemu: make use of os.path.realpath to dereference symlinks

Modified:
    incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py

Modified: incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1301186&r1=1301185&r2=1301186&view=diff
==============================================================================
--- incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py Thu Mar 15 20:38:44 2012
@@ -132,9 +132,7 @@ class Qemu(VmControlInterface):
 	def __getHostPids(self):
 		"""Utility function to get a list of system PIDs that match the QEMU_BIN specified (/proc/nnn/exe)"""
 		pids = []
-		real_bin = self.QEMU_BIN
-		while os.path.islink(real_bin):
-			real_bin = os.readlink(real_bin)
+		real_bin = os.path.realpath(self.QEMU_BIN)
 
 		for f in os.listdir("/proc"):
 			try: