diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2015-01-27 11:40:06 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-07-08 17:05:22 +0100 |
commit | d34bf4982f8a627901f6538be3b9e52cc30fe91b (patch) | |
tree | 96216060a61b223fb316ca5ee38af6de172e0590 /docs/plugins.rst | |
parent | 6a239ddeb5de9a04e7e7081ea6425d89dddda3f5 (diff) | |
download | sos-d34bf4982f8a627901f6538be3b9e52cc30fe91b.tar.gz |
[sosoptions] ensure '_sysroot' and '_chroot' are initialised
Make sure the sysroot and chroot members of the SoSOptions object
are initialised to prevent exceptions when these are not set on
the command line:
sosreport
Traceback (most recent call last):
File "/usr/sbin/sosreport", line 25, in <module>
main(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1490, in main
sos = SoSReport(args)
File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 673, in __init__
self.policy = sos.policies.load(sysroot=self.opts.sysroot)
File "/usr/lib/python2.7/site-packages/sos/policies/__init__.py", line 40, in load
cache['policy'] = policy(sysroot=sysroot)
File "/usr/lib/python2.7/site-packages/sos/policies/redhat.py", line 192, in __init__
super(FedoraPolicy, self).__init__(sysroot=sysroot)
File "/usr/lib/python2.7/site-packages/sos/policies/redhat.py", line 58, in __init__
if self.package_manager.all_pkgs()['filesystem']['version'][0] == '3':
File "/usr/lib/python2.7/site-packages/sos/policies/__init__.py", line 116, in all_pkgs
self.packages = self.get_pkg_list()
File "/usr/lib/python2.7/site-packages/sos/policies/__init__.py", line 99, in get_pkg_list
pkg_list = shell_out(cmd, chroot=self.chroot).splitlines()
File "/usr/lib/python2.7/site-packages/sos/utilities.py", line 191, in shell_out
return sos_get_command_output(cmd, chroot=chroot, chdir=runat)['output']
File "/usr/lib/python2.7/site-packages/sos/utilities.py", line 156, in sos_get_command_output
raise e
OSError: [Errno 1] Operation not permitted: '/'
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'docs/plugins.rst')
0 files changed, 0 insertions, 0 deletions