Commit 3d7bb48c authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix modules in shell functions

parent e75a7f36
......@@ -194,8 +194,9 @@ class ShellFunction(ScriptFunction):
shell_path = shell
shell = os.path.basename(shell)
source = '#!%s\n' % shell_path + \
("\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 "")
("\n".join(("module load " + module) for module in modules) if len(modules) > 0 else "") + "\n" + \
source + \
"\n" + ("\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