fix: improved logging

This commit is contained in:
adobdin 2016-08-09 08:27:00 +00:00
parent 5789369f99
commit beec17ab52
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@
# under the License.
project_name = 'timmy'
version = '1.15.1'
version = '1.15.2'
if __name__ == '__main__':
sys.exit(0)

View File

@ -258,9 +258,9 @@ def ssh_node(ip, command='', ssh_opts=None, env_vars=None, timeout=15,
cmd = "%s < '%s'" % (cmd, inputfile)
else:
cmd = "%s'%s bash -s' < '%s'" % (bstr, prefix, filename)
logger.info("inputfile selected, cmd: %s" % cmd)
if outputfile is not None:
cmd = "%s > '%s'" % (cmd, outputfile)
if outputfile is not None:
cmd = "%s > '%s'" % (cmd, outputfile)
logger.info("cmd: %s" % cmd)
cmd = ("input=\"$(cat | xxd -p)\"; trap 'kill $pid' 15; " +
"trap 'kill $pid' 2; echo -n \"$input\" | xxd -r -p | " + cmd +
' &:; pid=$!; wait $!')