app/soc/logic/allocations.py
changeset 2143 67c1cb524b78
parent 2140 32b0731f0bf5
child 2188 95b23c66257b
equal deleted inserted replaced
2142:573301607587 2143:67c1cb524b78
   275       allocations[org] = slots
   275       allocations[org] = slots
   276       del self.popularity[org]
   276       del self.popularity[org]
   277 
   277 
   278     total_popularity = sum(self.popularity.values())
   278     total_popularity = sum(self.popularity.values())
   279 
   279 
       
   280     # all orgs have been locked, nothing to do
       
   281     if total_popularity <= 0:
       
   282       return allocations
       
   283 
   280     pop_per_slot = float(available_slots)/float(total_popularity)
   284     pop_per_slot = float(available_slots)/float(total_popularity)
   281 
   285 
   282     slack = 0
   286     slack = 0
   283     wanted = {}
   287     wanted = {}
   284 
   288