aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stokes <adam.stokes@ubuntu.com>2013-04-14 12:33:51 -0400
committerAdam Stokes <adam.stokes@ubuntu.com>2013-04-14 12:33:51 -0400
commit7d1760c6741729a6e35dc551dd7c606da2da592d (patch)
tree7305877afe094da261f40285e19105fdbcc95fc4
parent50fd0cef8ae76c920fc2f09af5cc4e8dc149e9e7 (diff)
downloadsos-7d1760c6741729a6e35dc551dd7c606da2da592d.tar.gz
pyflakes results
sos/plugins/cgroups.py: - Fix call to non existent cgroups method sos/plugins/{dhcp,iscitarget}.py: - Fix class call names sos/plugins/process.py: - Remove random method calling nonexistent routines sos/plugins/selinux.py: - Fix call to do_regex_findall Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r--sos/plugins/cgroups.py1
-rw-r--r--sos/plugins/dhcp.py8
-rw-r--r--sos/plugins/iscsitarget.py9
-rw-r--r--sos/plugins/process.py6
-rw-r--r--sos/plugins/selinux.py2
5 files changed, 11 insertions, 15 deletions
diff --git a/sos/plugins/cgroups.py b/sos/plugins/cgroups.py
index 1027c04e..102b71c4 100644
--- a/sos/plugins/cgroups.py
+++ b/sos/plugins/cgroups.py
@@ -39,5 +39,4 @@ class RedHatCgroups(Cgroups, RedHatPlugin):
"/etc/cgsnapshot_blacklist.conf",
"/etc/cgconfig.conf",
"/etc/cgrules.conf"])
- cgroups.setup(self)
diff --git a/sos/plugins/dhcp.py b/sos/plugins/dhcp.py
index ccddd75d..d66dfec1 100644
--- a/sos/plugins/dhcp.py
+++ b/sos/plugins/dhcp.py
@@ -14,20 +14,20 @@
from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin
-class dhcp(Plugin):
+class Dhcp(Plugin):
"""DHCP related information
"""
plugin_name = "dhcp"
-class RedHatDhcp(dhcp, RedHatPlugin):
+class RedHatDhcp(Dhcp, RedHatPlugin):
"""DHCP related information for Red Hat based distributions"""
files = ('/etc/rc.d/init.d/dhcpd',)
packages = ('dhcp',)
def setup(self):
- super(DhcpRedHat, self).setup()
+ super(RedHatDhcp, self).setup()
self.add_copy_specs([
"/etc/dhcpd.conf",
"/etc/dhcp"])
@@ -39,7 +39,7 @@ class UbuntuDhcp(dhcp, UbuntuPlugin):
packages = ('udhcpd',)
def setup(self):
- super(DhcpDebian, self).setup()
+ super(DebianDhcp, self).setup()
self.add_copy_specs([
"/etc/default/udhcpd",
"/etc/udhcpd.conf"
diff --git a/sos/plugins/iscsitarget.py b/sos/plugins/iscsitarget.py
index 284fe36b..1657e6cb 100644
--- a/sos/plugins/iscsitarget.py
+++ b/sos/plugins/iscsitarget.py
@@ -17,30 +17,31 @@
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
-class iscsitarget(Plugin):
+class Iscsitarget(Plugin):
"""iscsi-target related information
"""
plugin_name = "iscsitarget"
-class RedHatIscsiTarget(Plugin, RedHatPlugin):
+class RedHatIscsiTarget(Iscsitarget, RedHatPlugin):
"""iscsi-target related information for Red Hat distributions
"""
packages = ('scsi-target-utils',)
def setup(self):
+ super(RedHatIscsiTarget, self).setup()
self.add_copy_spec("/etc/tgt/targets.conf")
self.add_cmd_output("tgtadm --lld iscsi --op show --mode target")
-class DebianIscsiTarget(iscsitarget, DebianPlugin, UbuntuPlugin):
+class DebianIscsiTarget(Iscsitarget, DebianPlugin, UbuntuPlugin):
"""iscsi-target related information for Debian based distributions
"""
packages = ('iscsitarget',)
def setup(self):
- super(DebianIscsi, self).setup()
+ super(DebianIscsiTarget, self).setup()
self.add_copy_specs([
"/etc/iet",
"/etc/sysctl.d/30-iscsitarget.conf",
diff --git a/sos/plugins/process.py b/sos/plugins/process.py
index 83e8f588..2b3faff9 100644
--- a/sos/plugins/process.py
+++ b/sos/plugins/process.py
@@ -16,7 +16,7 @@ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
import time
import os
-class process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"""process information
"""
def setup(self):
@@ -25,7 +25,3 @@ class process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
self.add_cmd_output("ps alxwww")
self.add_cmd_output("pstree", root_symlink = "pstree")
self.add_cmd_output("lsof -b +M -n -l", root_symlink = "lsof")
-
- def find_mountpoint(s):
- if (os.path.ismount(s) or len(s)==0): return s
- else: return mountpoint(os.path.split(s)[0])
diff --git a/sos/plugins/selinux.py b/sos/plugins/selinux.py
index bbcf7b71..c3501eec 100644
--- a/sos/plugins/selinux.py
+++ b/sos/plugins/selinux.py
@@ -31,7 +31,7 @@ class selinux(Plugin, RedHatPlugin):
# Check for SELinux denials and capture raw output from sealert
if self.policy().default_runlevel() in self.policy().runlevel_by_service("setroubleshoot"):
# TODO: fixup regex for more precise matching
- sealert=do_regex_find_all(r"^.*setroubleshoot:.*(sealert\s-l\s.*)","/var/log/messages")
+ sealert=do_regex_findall(r"^.*setroubleshoot:.*(sealert\s-l\s.*)","/var/log/messages")
if sealert:
for i in sealert:
self.add_cmd_output("%s" % i)