incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1294409 - /incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
Date Tue, 28 Feb 2012 00:20:05 GMT
Author: stroucki
Date: Tue Feb 28 00:20:05 2012
New Revision: 1294409

URL: http://svn.apache.org/viewvc?rev=1294409&view=rev
Log:
qemu: readlink only works on links, follow links until resolved

Modified:
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1294409&r1=1294408&r2=1294409&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Tue Feb 28 00:20:05 2012
@@ -132,7 +132,10 @@ 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 = os.readlink(self.QEMU_BIN)
+		real_bin = self.QEMU_BIN
+		while os.path.islink(real_bin):
+			real_bin = os.readlink(self.QEMU_BIN)
+
 		for f in os.listdir("/proc"):
 			try:
 				bin = os.readlink("/proc/%s/exe" % (f))



Mime
View raw message