mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Merge pull request #741 from tima/low-level-stderr
concatenating stdout and stderr in runner/__init__'s _low_level_exec_command
This commit is contained in:
commit
dc3e142486
1 changed files with 9 additions and 2 deletions
|
@ -616,9 +616,16 @@ class Runner(object):
|
||||||
stdin, stdout, stderr = conn.exec_command(cmd, tmp, sudo_user, sudoable=sudoable)
|
stdin, stdout, stderr = conn.exec_command(cmd, tmp, sudo_user, sudoable=sudoable)
|
||||||
|
|
||||||
if type(stdout) != str:
|
if type(stdout) != str:
|
||||||
return "\n".join(stdout.readlines())
|
out = "\n".join(stdout.readlines())
|
||||||
else:
|
else:
|
||||||
return stdout
|
out = stdout
|
||||||
|
|
||||||
|
if type(stderr) != str:
|
||||||
|
err = "\n".join(stderr.readlines())
|
||||||
|
else:
|
||||||
|
err = stderr
|
||||||
|
|
||||||
|
return out + err
|
||||||
|
|
||||||
# *****************************************************
|
# *****************************************************
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue