mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00

* Fixing saltstack/salt#55262 by using cmd correctly This commit attemts to fix saltstack/salt#55262 by ensuring that output from stdout and stderr isn't mixed in `iptables.save`. It also changes other invocations of `cmd.*` by using `cmd.run_stdout` and `com.run_stderr` respectively to what the iptables function expects. I found some other issues here, where for example `iptables.new_chain` returns `True` when successful and `iptables.set_policy` returns `False` when successful. But that's for a separate patch to fix. * adding changelog entry * run pre-commit hooks * remove unused import * update iptables.check to use stdout * update tests * explicitly use stdout for help output and version checking, too * linting/blacken test_iptables * add mocks for run_stdout and run_stderr where necessary * blacken test_iptables again * linting test_iptables * empty commit to trigger PR rebuild to fix spurious error report Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>
1 line
155 B
Text
1 line
155 B
Text
Fixed bug #55262 where `salt.modules.iptables` would call `cmd.run` and receive and interpret interspersed `stdout` and `stderr` output from subprocesses.
|