diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2016-05-05 11:47:22 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2016-05-24 17:27:03 +0100 |
commit | 472c8193a9f69bb7bd352203ef3404b0400a0d4a (patch) | |
tree | 604c6a45eb2d79ed42d3d680c7b2ef565351507b | |
parent | 03cfbe57966090d041c4689f8cc3fd291789fb5a (diff) | |
download | sos-472c8193a9f69bb7bd352203ef3404b0400a0d4a.tar.gz |
[suse] fix constructor sysroot argument
The Policy class hierarchy requires a 'sysroot' kwarg for class
constructors. This is used to pass the location of the actual
host root file system for container configurations.
The SuSE policy is currently missing this argument, leading to an
exception during policy loading:
Traceback (most recent call last):
File "/usr/sbin/sosreport", line 25, in
main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1592, in
main
sos = SoSReport(args)
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 676, in
init
self.policy = sos.policies.load(sysroot=self.opts.sysroot)
File "/usr/lib/python2.7/site-packages/sos/policies/init.py", line 38,
in load
cache['policy'] = policy(sysroot=sysroot)
TypeError: init() got an unexpected keyword argument 'sysroot'
Fixes #809.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/policies/suse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/policies/suse.py b/sos/policies/suse.py index 9dda6e77..00414ce8 100644 --- a/sos/policies/suse.py +++ b/sos/policies/suse.py @@ -29,7 +29,7 @@ class SuSEPolicy(LinuxPolicy): vendor_url = "https://www.suse.com/" _tmp_dir = "/var/tmp" - def __init__(self): + def __init__(self, sysroot=None): super(SuSEPolicy, self).__init__() self.report_name = "" self.ticket_number = "" |