diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2018-05-29 12:11:52 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-20 18:01:21 +0100 |
commit | 229bafd12a5c77fccd7f2306f389dddf8a814530 (patch) | |
tree | e818fcc5772875c548f59aec833ea2658e56d583 | |
parent | 7d04b3884a7a529f5de184be62224c22132d29eb (diff) | |
download | sos-229bafd12a5c77fccd7f2306f389dddf8a814530.tar.gz |
[sosreport] improve --list-preset argument filtering
Preset arguments should not be included in presets: simplify the
filtering to use lists of filtered argument names.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/sosreport.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py index 3d0ff49d..3bddea46 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -867,9 +867,8 @@ class SoSReport(object): if self.opts.verbosity > 0: # Filter out options that do not make sense in presets def filter_opt(opt): - if opt.startswith("add_preset"): - return False - if opt.startswith("del_preset"): + opt = opt.split("=")[0] + if opt in ("add_preset", "del_preset", "desc", "note"): return False return True opts = str(preset.opts).split() |