Merge pull request #925 from jdavisp3/serial-fix

Fix off-by-one serial count (causing infinite loop for serial == 1).
This commit is contained in:
Michael DeHaan 2012-08-21 14:03:08 -07:00
commit f4ef94ccdd

View file

@ -312,7 +312,7 @@ class PlayBook(object):
# do N forks all the way through before moving to next # do N forks all the way through before moving to next
while len(all_hosts) > 0: while len(all_hosts) > 0:
play_hosts = [] play_hosts = []
for x in range(1, play.serial): for x in range(play.serial):
if len(all_hosts) > 0: if len(all_hosts) > 0:
play_hosts.append(all_hosts.pop()) play_hosts.append(all_hosts.pop())
serialized_batch.append(play_hosts) serialized_batch.append(play_hosts)