(out, err), proc = self.execute(cmd, retry = 1, with_lock = True)
(out, err), proc = self.execute(cmd, retry = 1, with_lock = True)
- def search_for_child(self, pid, pids, ppid, family=[]):
+ def search_for_child(self, pid, pids, ppid, family=None):
# create a temporal file with the content to upload
# in python3 we need to open in binary mode if str is bytes
mode = 'w' if isinstance(src, str) else 'wb'
# create a temporal file with the content to upload
# in python3 we need to open in binary mode if str is bytes
mode = 'w' if isinstance(src, str) else 'wb'
return self.execute(cmd, with_lock = True)
def run_and_wait(self, command, home,
return self.execute(cmd, with_lock = True)
def run_and_wait(self, command, home,
"""
Uploads the 'command' to a bash script in the host.
Then runs the script detached in background in the host, and
"""
Uploads the 'command' to a bash script in the host.
Then runs the script detached in background in the host, and
""" Saves the command as a bash script file in the remote host, and
forces to save the exit code of the command execution to the ecodefile
"""
""" Saves the command as a bash script file in the remote host, and
forces to save the exit code of the command execution to the ecodefile
"""
# The exit code of the command will be stored in ecodefile
command = " {{ {command} }} ; echo $? > {ecodefile} ;"\
# The exit code of the command will be stored in ecodefile
command = " {{ {command} }} ; echo $? > {ecodefile} ;"\
- return self.upload(command, shfile, text=True, overwrite=overwrite)
+ return self.upload(command, shfile, text = True, overwrite = overwrite)
""" Formats the environment variables for a command to be executed
either as an inline command
(i.e. export PYTHONPATH=src/..; export LALAL= ..;python script.py) or
""" Formats the environment variables for a command to be executed
either as an inline command
(i.e. export PYTHONPATH=src/..; export LALAL= ..;python script.py) or