From 5e7346542ac1d11d73e9cbf84cecce910c5c823d Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 23 Apr 2013 17:51:26 +0100 Subject: 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 --- sos/plugins/kernel.py | 4 ++-- 1 file 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([ -- cgit