Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions easybuild/easyblocks/generic/cmdcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ def build_step(self):
# determine command to use
# find (first) regex match, then complete matching command template
cmd = None
for pattern, regex_cmd in self.cfg.get_ref('cmds_map'):
pattern = pattern % self.cfg.template_values
regex_cmd = regex_cmd % self.cfg.template_values
for pattern, regex_cmd in self.cfg['cmds_map']:
try:
regex = re.compile(pattern)
except re.error as err:
Expand All @@ -80,6 +78,6 @@ def build_step(self):
break
if cmd is None:
raise EasyBuildError("No match for %s in %s, don't know which command to use.",
src, self.cfg.get_ref('cmds_map'))
src, self.cfg['cmds_map'])

run_shell_cmd(cmd)