diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-04-23 17:51:26 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-04-23 17:51:26 +0100 |
commit | 5e7346542ac1d11d73e9cbf84cecce910c5c823d (patch) | |
tree | 8b8cee796fa27bf5c4a70e6e69770ebbddfc1b7f | |
parent | b6c4be32b8fa25d1897009c53398fd92f8b6b1ab (diff) | |
download | sos-5e7346542ac1d11d73e9cbf84cecce910c5c823d.tar.gz |
Fix scoping bug in kernel.py
The path "/sys/module" was made into a class variable to avoid
repeating the string through the file. Make sure all uses qualify
the variable appropriately.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/kernel.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index 8c50da2d..de25e8b6 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -27,10 +27,10 @@ class kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): self.add_cmd_output("lsmod", root_symlink = "lsmod") try: - modules = os.listdir(sys_module) + modules = os.listdir(self.sys_module) self.add_cmd_output("modinfo " + " ".join(modules)) except OSError: - self.soslog.error("could not list %s" % sys_module) + self.soslog.error("could not list %s" % self.sys_module) self.add_cmd_output("sysctl -a") self.add_copy_specs([ |