Skip to content

Commit bbc0909

Browse files
Removing stdout being replaced by stderr
1 parent 82beed8 commit bbc0909

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

plugins/module_utils/zos_mvs_raw.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ def execute(pgm, dds, parm="", debug=False, verbose=False, tmp_hlq=None):
5959
"--tmphlq={0}".format(tmp_hlq.upper()) if tmp_hlq else "",
6060
MVSCmd._build_command(pgm, dds, parm),
6161
)
62-
rc, out, err = module.run_command(command, errors='replace')
63-
if rc == 0 and verbose:
64-
out = err
62+
rc, out, err = module.run_command(command)
6563
return MVSCmdResponse(rc, out, err)
6664

6765
@staticmethod
@@ -91,9 +89,7 @@ def execute_authorized(pgm, dds, parm="", debug=False, verbose=False, tmp_hlq=No
9189
"--tmphlq={0}".format(tmp_hlq.upper()) if tmp_hlq else "",
9290
MVSCmd._build_command(pgm, dds, parm),
9391
)
94-
rc, out, err = module.run_command(command, errors='replace')
95-
if rc == 0 and verbose:
96-
out = err
92+
rc, out, err = module.run_command(command)
9793
return MVSCmdResponse(rc, out, err)
9894

9995
@staticmethod

tests/functional/modules/test_zos_mvs_raw_func.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_failing_name_format(ansible_zos_module):
6464
# Where a program will fail if rc != 0 only if verbose was True.
6565
"verbose",
6666
[True, False],
67-
)
67+
)
6868
def test_disposition_new(ansible_zos_module, verbose):
6969
idcams_dataset = None
7070
try:
@@ -98,6 +98,7 @@ def test_disposition_new(ansible_zos_module, verbose):
9898
],
9999
)
100100
for result in results.contacted.values():
101+
assert len(result.get("stdout")) > 0
101102
assert result.get("ret_code", {}).get("code", -1) == 0
102103
assert len(result.get("dd_names", [])) > 0
103104
assert result.get("failed", False) is False

0 commit comments

Comments
 (0)