Skip to content

Commit aa418bc

Browse files
authored
Merge pull request #1794 from ansible-collections/bugfix/1776/zos_mvs_raw-stdout-replaced-by-stderr
[Bug][zos_mvs_raw] Remove stdout being replaced by stderr when RC=0 and verbosity is true
2 parents a8b78d7 + 0d40615 commit aa418bc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bugfixes:
2+
- zos_mvs_raw - Module would return the stderr content in stdout when verbose was true and return code was 0.
3+
Fix now does not replace stdout content with stderr.
4+
(https://github.com/ansible-collections/ibm_zos_core/pull/1794).
5+

plugins/module_utils/zos_mvs_raw.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ def execute(pgm, dds, parm="", debug=False, verbose=False, tmp_hlq=None):
6060
MVSCmd._build_command(pgm, dds, parm),
6161
)
6262
rc, out, err = module.run_command(command, errors='replace')
63-
if rc == 0 and verbose:
64-
out = err
6563
return MVSCmdResponse(rc, out, err)
6664

6765
@staticmethod
@@ -92,8 +90,6 @@ def execute_authorized(pgm, dds, parm="", debug=False, verbose=False, tmp_hlq=No
9290
MVSCmd._build_command(pgm, dds, parm),
9391
)
9492
rc, out, err = module.run_command(command, errors='replace')
95-
if rc == 0 and verbose:
96-
out = err
9793
return MVSCmdResponse(rc, out, err)
9894

9995
@staticmethod

0 commit comments

Comments
 (0)