commit: b64c30c124116d88ffb7339db6a7dd798b22e04f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 24 21:45:25 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 24 21:45:25 2021 +0000
URL: https://gitweb.gentoo.org/proj/tatt.git/commit/?id=b64c30c1
tatt/usecombis.py: Tidy up
Signed-off-by: Sam James <sam <AT> gentoo.org>
tatt/usecombis.py | 26 +++++++++++++-------------
1 file 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: