aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-02-24 21:45:25 +0000
committerSam James <sam@gentoo.org>2021-02-24 21:45:25 +0000
commitb64c30c124116d88ffb7339db6a7dd798b22e04f (patch)
treea1f1f45f4cced137100dd34bccc97eff72e2080e
parenttemplates/tatt_functions.sh: Don't use binpkgs when running the build test (diff)
downloadtatt-b64c30c124116d88ffb7339db6a7dd798b22e04f.tar.gz
tatt-b64c30c124116d88ffb7339db6a7dd798b22e04f.tar.bz2
tatt-b64c30c124116d88ffb7339db6a7dd798b22e04f.zip
tatt/usecombis.py: Tidy up
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--tatt/usecombis.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tatt/usecombis.py b/tatt/usecombis.py
index c24a82c..1603b6b 100644
--- a/tatt/usecombis.py
+++ b/tatt/usecombis.py
@@ -56,20 +56,20 @@ def findUseFlagCombis (package, config, port):
ignore_use_expand = False
while len(swlist) < config['usecombis'] and len(rnds) < s:
- if attempts >= 10000 and not ignore_use_expand:
- # After 10000 attempts, let's give up on USE_EXPAND.
- ignore_use_expand = True
- attempts = 0
+ if attempts >= 10000:
+ if not ignore_use_expand:
+ # After 10000 attempts, let's give up on USE_EXPAND.
+ ignore_use_expand = True
+ attempts = 0
- print("Giving up on USE_EXPAND after {0} tries to find valid USE combinations".format(attempts))
- print("We've found {0} USE combinations so far".format(len(swlist)))
- uselist = [use for use in uselist if not "_" in use]
-
- if attempts >= 10000 and ignore_use_expand:
- # Let's give up entirely and use what we have.
- print("Giving up on finding more USE combinations after {0} further attempts".format(attempts))
- print("We've found {0} USE combinations".format(len(swlist)))
- break
+ print("Giving up on USE_EXPAND after {0} tries to find valid USE combinations".format(attempts))
+ print("We've found {0} USE combinations so far".format(len(swlist)))
+ uselist = [use for use in uselist if not "_" in use]
+ else:
+ # Let's give up entirely and use what we have.
+ print("Giving up on finding more USE combinations after {0} further attempts".format(attempts))
+ print("We've found {0} USE combinations".format(len(swlist)))
+ break
r = random.randint(0, s-1)
if r in rnds: