]> git.ipfire.org Git - ipfire.org.git/commitdiff
Added randomize token for distcc.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 Oct 2008 18:11:30 +0000 (20:11 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 Oct 2008 18:11:30 +0000 (20:11 +0200)
build/rpc.py

index 51cf15f04ed25445ca24bf8288d2464ba979b56b..810584853dfa46150776ebfc0358d743afd088f6 100644 (file)
@@ -78,11 +78,12 @@ elif action == "get":
                                        for builder in getAllBuilders():
                                                if uuid == builder.uuid: continue
                                                builders.append("%s" % builder.distcc)
-                                       string = "localhost/1"
+                                       string = "localhost/1\n--randomize\n"
                                        while True:
                                                if not builders: break
                                                rand = random.randint(0, len(builders)-1)
-                                               string = "%s %s" % (string, builders[rand],)
+                                               if builders[rand]:
+                                                       string = "%s%s\n" % (string, builders[rand],)
                                                builders.pop(rand)
                                        response.set_mesg(string)