diff options
-rw-r--r-- | sos/policies/__init__.py | 7 | ||||
-rw-r--r-- | sos/report/__init__.py | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index 6fd08adf..c6b329ed 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -22,7 +22,7 @@ from sos import _sos as _ from textwrap import fill from pipes import quote -PRESETS_PATH = "/var/lib/sos/presets" +PRESETS_PATH = "/etc/sos/presets.d" try: import requests @@ -931,9 +931,8 @@ any third party. pd.note = data[NOTE] if NOTE in data else "" if OPTS in data: - for arg in _arg_names: - if arg in data[OPTS]: - setattr(pd.opts, arg, data[OPTS][arg]) + for arg in data[OPTS]: + setattr(pd.opts, arg, data[OPTS][arg]) pd.builtin = False self.presets[preset] = pd diff --git a/sos/report/__init__.py b/sos/report/__init__.py index 74454806..31a6146f 100644 --- a/sos/report/__init__.py +++ b/sos/report/__init__.py @@ -751,8 +751,8 @@ class SoSReport(SoSComponent): return False # Filter --add-preset <name> from arguments list - arg_index = self._args.index("--add-preset") - args = self._args[0:arg_index] + self._args[arg_index + 2:] + arg_index = self.cmdline.index("--add-preset") + args = self.cmdline[0:arg_index] + self.cmdline[arg_index + 2:] self.ui_log.info("Added preset '%s' with options %s\n" % (name, " ".join(args))) |