git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adding back use of sudo in sshfuncs.rexec
[nepi.git]
/
src
/
nepi
/
resources
/
linux
/
node.py
diff --git
a/src/nepi/resources/linux/node.py
b/src/nepi/resources/linux/node.py
index
b7e8668
..
f5a5429
100644
(file)
--- a/
src/nepi/resources/linux/node.py
+++ b/
src/nepi/resources/linux/node.py
@@
-428,19
+428,14
@@
class LinuxNode(ResourceManager):
forces to save the exit code of the command execution to the ecodefile
"""
forces to save the exit code of the command execution to the ecodefile
"""
- # Prepare command to be executed as a bash script file
- # Make sure command ends in ';' so the curly brackets syntax is correct
- if not command.strip()[-1] == ';':
- command += " ; "
-
# The exit code of the command will be stored in ecodefile
# The exit code of the command will be stored in ecodefile
- command = "
{ { %(command)s } ; echo $? > %(ecodefile)s ; }
" % {
+ command = "
%(command)s ; echo $? > %(ecodefile)s ;
" % {
'command': command,
'ecodefile': ecodefile,
}
# Export environment
'command': command,
'ecodefile': ecodefile,
}
# Export environment
- environ = "\n".join(map(lambda e: "export %s" % e, env.split(" "))) \
+ environ = "\n".join(map(lambda e: "export %s" % e, env.split(" ")))
+ "\n"
\
if env else ""
# Add environ to command
if env else ""
# Add environ to command