incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1363181 - /incubator/tashi/trunk/src/tashi/client/tashi-client.py
Date Thu, 19 Jul 2012 00:03:48 GMT
Author: stroucki
Date: Thu Jul 19 00:03:48 2012
New Revision: 1363181

URL: http://svn.apache.org/viewvc?rev=1363181&view=rev
Log:
tashi-client: Don't use lambda functions for choices of grammatical number; a string list
works as well.

Modified:
    incubator/tashi/trunk/src/tashi/client/tashi-client.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=1363181&r1=1363180&r2=1363181&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/client/tashi-client.py (original)
+++ incubator/tashi/trunk/src/tashi/client/tashi-client.py Thu Jul 19 00:03:48 2012
@@ -201,11 +201,11 @@ def getSlots(cores, memory):
 		countbymemory = int((h.memory - h.usedMemory) / memory)
 		count += max(0, min(countbycores, countbymemory))
 
-	print "%d" % (count),
-	print (lambda:"instances", lambda:"instance")[count == 1](),
+	print "%d" % (count), "available slots for",
+	print ("instances", "instance")[count == 1],
 	print "with %d" % (cores),
-	print (lambda:"cores", lambda:"core")[cores == 1](),
-	print "and %d MB memory could be created." % (memory)
+	print ("cores", "core")[cores == 1],
+	print "and %d MB memory." % (memory)
 	
 def createMany(instance, count):
 	# will create instances from 0 to count-1



Mime
View raw message