diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2017-03-28 17:15:28 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-03-28 17:15:28 +0100 |
commit | 77eb4abc7cbd9d830afdaf77763bea2ace2ea0d4 (patch) | |
tree | 7948073dc09c88d082713a140691bf42159d52d5 | |
parent | 4e7ecf0f2ffb6789247b4b742b154508f83bdc72 (diff) | |
download | sos-77eb4abc7cbd9d830afdaf77763bea2ace2ea0d4.tar.gz |
[Plugin] do not return output from failed commands
If a command returns status of '1' in Plugin.get_cmd_output_now(),
do not return output even if the command wrote to stdio.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 4eca81cb..46f9cb83 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -687,6 +687,10 @@ class Plugin(object): # 126 means 'found but not executable' if result['status'] == 126 or result['status'] == 127: return None + + if result['status'] == 1: + return None + self._log_debug("collected output of '%s' in %s" % (exe.split()[0], time() - start)) |