incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1301186 - /incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py
Date Thu, 15 Mar 2012 20:38:45 GMT
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:



Mime
View raw message