aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-10-30 15:05:56 +0000
committerBryn M. Reeves <bmr@redhat.com>2013-10-30 15:05:56 +0000
commit2ea9da82411b4eca2fe959906f520ac2decfb866 (patch)
treeb98d24e4d5ad65bf48361a26b51ec2a9d15eb442
parent9d7c1dede6c23ce86a07ffb0c1a83c4d285e680c (diff)
downloadsos-2ea9da82411b4eca2fe959906f520ac2decfb866.tar.gz
Fix config file regression
Changes in the organisation of sos in commit 6ea48cb broke the reading of custom configuration files (either the default /etc/sos.conf or one specified on the command line using --config-file): Traceback (most recent call last): File "/usr/sbin/sosreport", line 23, in <module> main(sys.argv[1:]) File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1167, in main sos.execute() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1133, in execute self._set_tunables() File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 798, in _set_tunables if not opt.split('.')[0] in self.disabled: AttributeError: 'SoSReport' object has no attribute 'disabled' The code attempts to reference the obsolete 'disabled' list of plug-ins (rather than calling self._get_disabled_plugins()) and failed to initialise the plugopts list to an empty deque. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/sosreport.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/sosreport.py b/sos/sosreport.py
index 1b138269..afe61f2f 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -465,7 +465,8 @@ class SoSOptions(object):
help="enable these plugins only", default = deque())
parser.add_option("-k", "--plugin-option", action="append",
dest="plugopts", type="string",
- help="plugin options in plugname.option=value format (see -l)")
+ help="plugin options in plugname.option=value format (see -l)",
+ default = deque())
parser.add_option("-a", "--alloptions", action="store_true",
dest="usealloptions", default=False,
help="enable all options for loaded plugins")
@@ -801,7 +802,7 @@ class SoSReport(object):
self.opts.plugopts = deque()
for opt, val in self.config.items("tunables"):
- if not opt.split('.')[0] in self.disabled:
+ if not opt.split('.')[0] in self._get_disabled_plugins():
self.opts.plugopts.append(opt + "=" + val)
if self.opts.plugopts:
opts = {}