Commit e75a7f36 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix modules in python functions

parent 4ae9c436
......@@ -194,8 +194,8 @@ class ShellFunction(ScriptFunction):
shell_path = shell
shell = os.path.basename(shell)
source = '#!%s\n' % shell_path + \
((("module load " + module) for module in modules) if len(modules) > 0 else "") + "\n" + source + \
((("module unload " + module) for module in modules) if len(modules) > 0 else "")
("\n".join(("module load " + module) for module in modules) if len(modules) > 0 else "") + "\n" + source + \
("\n".join(("module unload " + module) for module in modules) if len(modules) > 0 else "")
ScriptFunction.__init__(self, source, executable, cmd_format)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment