aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/collector/__init__.py9
-rw-r--r--sos/options.py2
2 files changed, 7 insertions, 4 deletions
diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py
index 8c4291b0..f2f8fd23 100644
--- a/sos/collector/__init__.py
+++ b/sos/collector/__init__.py
@@ -237,15 +237,16 @@ class SoSCollector(SoSComponent):
sos_grp.add_argument('--chroot', default='',
choices=['auto', 'always', 'never'],
help="chroot executed commands to SYSROOT")
- sos_grp.add_argument('-e', '--enable-plugins', action="append",
+ sos_grp.add_argument('-e', '--enable-plugins', action="extend",
help='Enable specific plugins for sosreport')
- sos_grp.add_argument('-k', '--plugin-options', action="append",
+ sos_grp.add_argument('-k', '--plugin-options', action="extend",
help='Plugin option as plugname.option=value')
sos_grp.add_argument('--log-size', default=0, type=int,
help='Limit the size of individual logs (in MiB)')
- sos_grp.add_argument('-n', '--skip-plugins', action="append",
+ sos_grp.add_argument('-n', '--skip-plugins', action="extend",
help='Skip these plugins')
- sos_grp.add_argument('-o', '--only-plugins', action="append",
+ sos_grp.add_argument('-o', '--only-plugins', action="extend",
+ default=[],
help='Run these plugins only')
sos_grp.add_argument('--no-env-vars', action='store_true',
default=False,
diff --git a/sos/options.py b/sos/options.py
index e0b209d1..3b2b5085 100644
--- a/sos/options.py
+++ b/sos/options.py
@@ -149,6 +149,8 @@ class SoSOptions():
"""
if isinstance(self.arg_defaults[key], type(val)):
return val
+ if isinstance(self.arg_defaults[key], list):
+ return [v for v in val.split(',')]
if isinstance(self.arg_defaults[key], bool):
_val = val.lower()
if _val in ['true', 'on', 'yes']: