Fix loading of compiler modules on CRAY (#17984)
The modifications in 193e8333fa
introduced a bug in the loading of compiler modules, since a
function that was expecting a list of string was just getting
a string.
This commit fixes the bug and adds an assertion to verify the
prerequisite of the function.
This commit is contained in:
parent
f0c0cd5c3f
commit
6cda20472e
@ -642,7 +642,7 @@ def get_rpaths(pkg):
|
|||||||
# Second module is our compiler mod name. We use that to get rpaths from
|
# Second module is our compiler mod name. We use that to get rpaths from
|
||||||
# module show output.
|
# module show output.
|
||||||
if pkg.compiler.modules and len(pkg.compiler.modules) > 1:
|
if pkg.compiler.modules and len(pkg.compiler.modules) > 1:
|
||||||
rpaths.append(path_from_modules(pkg.compiler.modules[1]))
|
rpaths.append(path_from_modules([pkg.compiler.modules[1]]))
|
||||||
return list(dedupe(filter_system_paths(rpaths)))
|
return list(dedupe(filter_system_paths(rpaths)))
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,6 +145,8 @@ def path_from_modules(modules):
|
|||||||
Returns:
|
Returns:
|
||||||
Guess of the prefix path where the package
|
Guess of the prefix path where the package
|
||||||
"""
|
"""
|
||||||
|
assert isinstance(modules, list), 'the "modules" argument must be a list'
|
||||||
|
|
||||||
best_choice = None
|
best_choice = None
|
||||||
for module_name in modules:
|
for module_name in modules:
|
||||||
# Read the current module and return a candidate path
|
# Read the current module and return a candidate path
|
||||||
|
Loading…
Reference in New Issue
Block a user