builder.py: don't import the 'random' module unless we need it.
Initializing the random number generator involves some pointless reading from /dev/urandom.
This commit is contained in:
parent
e1a0fc9c12
commit
e446d4dd04
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import sys, os, random, errno, stat
|
||||
import sys, os, errno, stat
|
||||
import vars, jwack, state
|
||||
from helpers import log, log_, debug2, err, unlink, close_on_exec
|
||||
|
||||
|
|
@ -194,6 +194,7 @@ class BuildJob:
|
|||
def main(targets, shouldbuildfunc):
|
||||
retcode = [0] # a list so that it can be reassigned from done()
|
||||
if vars.SHUFFLE:
|
||||
import random
|
||||
random.shuffle(targets)
|
||||
|
||||
locked = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue