Skip to content

Commit 56e2fc4

Browse files
committed
fix remarks/bugs
1 parent 5baa5d1 commit 56e2fc4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -941,14 +941,14 @@ def handle_iterate_opts(self):
941941
for opt in ITERATE_OPTIONS:
942942
# keep track of list, supply first element as first option to handle
943943
if isinstance(self.cfg[opt], (list, tuple)):
944-
self.iter_opts[opt + suffix] = self.cfg[opt][::-1] # reversed copy
944+
self.iter_opts[opt + suffix] = self.cfg[opt] # copy
945945
self.log.debug("Found list for %s: %s" % (opt, self.iter_opts[opt + suffix]))
946946

947947
# pop first element from all *_list options as next value to use
948948
for (lsname, ls) in self.iter_opts.items():
949949
opt = lsname[:-sufflen] # drop '_list' part from name to get option name
950-
if len(self.cfg[opt]) > 0:
951-
self.cfg[opt] = self.iter_opts[lsname].pop() # first element will be used next
950+
if len(self.iter_opts[lsname]) > 0:
951+
self.cfg[opt] = self.iter_opts[lsname].pop(0) # first element will be used next
952952
else:
953953
self.cfg[opt] = '' # empty list => empty option as next value
954954
self.log.debug("Next value for %s: %s" % (opt, str(self.cfg[opt])))
@@ -1675,7 +1675,6 @@ def prepare_step_spec(initial):
16751675
('module', 'creating module', [lambda x: x.make_module_step()], False),
16761676
]
16771677

1678-
16791678
# full list of steps, included iterated steps
16801679
steps = steps_part1 + steps_part2 + steps_part3
16811680

easybuild/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,8 +1060,8 @@ def perform_step(step, obj, method, logfile):
10601060
os.chdir(base_dir)
10611061
modify_env(os.environ, base_env)
10621062

1063-
iter_cnt = max([1] + [len(self.cfg[opt]) for opt in ITERATE_OPTIONS
1064-
if isinstance(self.cfg[opt], (list, tuple))])
1063+
iter_cnt = max([1] + [len(app.cfg[opt]) for opt in ITERATE_OPTIONS
1064+
if isinstance(app.cfg[opt], (list, tuple))])
10651065
steps = EasyBlock.get_steps(iteration_count=iter_cnt)
10661066

10671067
for (step_name, _, step_methods, _) in steps:

0 commit comments

Comments
 (0)