incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1294310 - in /incubator/tashi/trunk/src/tashi: client/tashi-client.py nodemanager/vmcontrol/qemu.py
Date Mon, 27 Feb 2012 20:19:02 GMT
Author: stroucki
Date: Mon Feb 27 20:19:02 2012
New Revision: 1294310

URL: http://svn.apache.org/viewvc?rev=1294310&view=rev
Log:
Patches from mryan.
qemu: follow any qemu-bin symlinks to real binary
tashi-client: print string type results properly

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

Modified: incubator/tashi/trunk/src/tashi/client/tashi-client.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/client/tashi-client.py?rev=1294310&r1=1294309&r2=1294310&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/client/tashi-client.py (original)
+++ incubator/tashi/trunk/src/tashi/client/tashi-client.py Mon Feb 27 20:19:02 2012
@@ -575,6 +575,8 @@ def main():
 			try:
 				if (type(res) == types.ListType):
 					makeTable(res, keys)
+				elif (type(res) == types.StringType):
+					print res
 				else:
 					makeTable([res], keys)
 					

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=1294310&r1=1294309&r2=1294310&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Mon Feb 27 20:19:02 2012
@@ -132,10 +132,11 @@ 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)
 		for f in os.listdir("/proc"):
 			try:
 				bin = os.readlink("/proc/%s/exe" % (f))
-				if (bin.find(self.QEMU_BIN) != -1):
+				if (bin.find(real_bin) != -1):
 					pids.append(int(f))
 			except Exception:
 				pass



Mime
View raw message