Skip to content

Commit 62473f3

Browse files
committed
Avoid warnings about missing template values in det_iter_cnt
We just need to number of elements, not their values
1 parent d687c43 commit 62473f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,8 +1561,9 @@ def post_iter_step(self):
15611561

15621562
def det_iter_cnt(self):
15631563
"""Determine iteration count based on configure/build/install options that may be lists."""
1564-
iter_opt_counts = [len(self.cfg[opt]) for opt in ITERATE_OPTIONS
1565-
if opt not in ['builddependencies'] and isinstance(self.cfg[opt], (list, tuple))]
1564+
# Using get_ref to avoid template substitution (and possible failures)
1565+
iter_opt_counts = [len(self.cfg.get_ref(opt)) for opt in ITERATE_OPTIONS
1566+
if opt not in ['builddependencies'] and isinstance(self.cfg.get_ref(opt), (list, tuple))]
15661567

15671568
# we need to take into account that builddependencies is always a list
15681569
# we're only iterating over it if it's a list of lists

0 commit comments

Comments
 (0)