Skip to content

Commit e97d20c

Browse files
committed
ansible_mitogen: Return stderr_lines from _low_level_execute_command()
Vanilla Ansible has returned stderr since v1.9 or earlier, stderr_lines was added in v2.6.0 (ansible/ansible#40079).
1 parent 51c7b78 commit e97d20c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ansible_mitogen/mixins.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,12 @@ def _low_level_execute_command(self, cmd, sudoable=True, in_data=None,
491491
continue
492492

493493
stdout_text = to_text(stdout, errors=encoding_errors)
494+
stderr_text = to_text(stderr, errors=encoding_errors)
494495

495496
return {
496497
'rc': rc,
497498
'stdout': stdout_text,
498499
'stdout_lines': stdout_text.splitlines(),
499-
'stderr': stderr,
500+
'stderr': stderr_text,
501+
'stderr_lines': stderr_text.splitlines(),
500502
}

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ In progress (unreleased)
3232
attributes
3333
* :gh:issue:`1213` :mod:`ansible_mitogen`: Decouple possible_pythons order &
3434
error handling
35+
* :gh:issue:`1213` :mod:`ansible_mitogen`: Return ``stderr_lines`` from
36+
``_low_level_execute_command()``
3537

3638

3739
v0.3.21 (2025-01-20)

0 commit comments

Comments
 (0)