Skip to content

Commit 3765124

Browse files
committed
Use correct variable for adding paths instead of entire dict value
1 parent 3d52e6a commit 3765124

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

easybuild/framework/easyblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ def make_module_extra(self, altroot=None, altversion=None):
14861486
raise EasyBuildError('modextrapaths dict value "{value}" paths must be list or str')
14871487
if not isinstance(delim, str):
14881488
raise EasyBuildError('modextrapaths dict value "{value}" delimiter must be a str')
1489-
lines.append(self.module_generator.update_paths(key, value, prepend=prepend, delim=delim,
1489+
lines.append(self.module_generator.update_paths(key, paths, prepend=prepend, delim=delim,
14901490
allow_abs=allow_abs))
14911491
else:
14921492
if isinstance(value, str):

test/framework/easyblock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ def test_make_module_step(self):
13401340
if get_module_syntax() == 'Tcl':
13411341
regex = re.compile(r'^prepend-path\s+(-d ".")?%s\s+\$root/%s$' % (key, val), re.M)
13421342
elif get_module_syntax() == 'Lua':
1343-
regex = re.compile(r'^prepend_path\("%s", pathJoin\(root, "%s"\)(, ".")\)$' % (key, val), re.M)
1343+
regex = re.compile(r'^prepend_path\("%s", pathJoin\(root, "%s"\)(, ".")?\)$' % (key, val), re.M)
13441344
else:
13451345
self.fail("Unknown module syntax: %s" % get_module_syntax())
13461346
self.assertTrue(regex.search(txt), "Pattern %s found in %s" % (regex.pattern, txt))
@@ -1355,7 +1355,7 @@ def test_make_module_step(self):
13551355
if get_module_syntax() == 'Tcl':
13561356
regex = re.compile(r'^append-path\s+(-d ".")?%s\s+\$root/%s$' % (key, val), re.M)
13571357
elif get_module_syntax() == 'Lua':
1358-
regex = re.compile(r'^append_path\("%s", pathJoin\(root, "%s"\)(, ".")\)$' % (key, val), re.M)
1358+
regex = re.compile(r'^append_path\("%s", pathJoin\(root, "%s"\)(, ".")?\)$' % (key, val), re.M)
13591359
else:
13601360
self.fail("Unknown module syntax: %s" % get_module_syntax())
13611361
self.assertTrue(regex.search(txt), "Pattern %s found in %s" % (regex.pattern, txt))

0 commit comments

Comments
 (0)