From e65d6e2a00f37b8486146ebd21fd7d7e8cdfdb3a Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 16 Sep 2013 18:33:21 -0500 Subject: [PATCH] Revert "suite: do not calculate product on an empty list" This reverts commit dda7954090ccc9ffd8ecd961d6b530a0e6d24964. This commit was causing the number of jobs scheduled per suite to be multiplied by anywhere from 2 to 7 or more. --- teuthology/suite.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/teuthology/suite.py b/teuthology/suite.py index 894e62db2c65f..0fc079a495f5d 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -250,13 +250,12 @@ def build_matrix(path): raw = build_matrix(os.path.join(path, fn)) sublists.append([(combine_path(fn, item[0]), item[1]) for item in raw]) out = [] - if sublists: - for sublist in itertools.product(*sublists): - name = '{' + ' '.join([item[0] for item in sublist]) + '}' - val = [] - for item in sublist: - val.extend(item[1]) - out.append((name, val)) + for sublist in itertools.product(*sublists): + name = '{' + ' '.join([item[0] for item in sublist]) + '}' + val = [] + for item in sublist: + val.extend(item[1]) + out.append((name, val)) return out else: # list items -- 2.39.5