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/07/19 00:03:48 UTC
svn commit: r1363181 -
/incubator/tashi/trunk/src/tashi/client/tashi-client.py
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