aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-19 08:57:35 -0700
committerBryn M. Reeves <bmr@redhat.com>2013-04-19 08:57:35 -0700
commitf2203df026a67ae35d67e7f794abac5cb2de7861 (patch)
tree66407088e0abb306ee224710b194be055e07016c
parent129f22df22c334ccabf0fcefa55aa6843d1942f2 (diff)
parent83610b6afd7c8498dd47df9102ac9e5aa9097e93 (diff)
downloadsos-f2203df026a67ae35d67e7f794abac5cb2de7861.tar.gz
Merge pull request #134 from battlemidget/fix-tabs-to-spaces-in-plugins
Fix tabs to spaces in plugins
-rw-r--r--sos/plugins/general.py28
-rw-r--r--sos/plugins/networking.py22
2 files changed, 26 insertions, 24 deletions
diff --git a/sos/plugins/general.py b/sos/plugins/general.py
index dc57ba95..557e7db9 100644
--- a/sos/plugins/general.py
+++ b/sos/plugins/general.py
@@ -100,24 +100,26 @@ class DebianGeneral(General, DebianPlugin):
"/etc/default",
"/etc/lsb-release"
])
-class UbuntuGeneral(DebianGeneral, UbuntuPlugin):
+class UbuntuGeneral(General, UbuntuPlugin):
"""Basic system information for Ubuntu based distributions"""
def setup(self):
super(UbuntuGeneral, self).setup()
self.add_copy_specs([
+ "/etc/default",
+ "/etc/lsb-release",
"/etc/os-release",
- "/var/log/apport.log",
- "/var/log/syslog",
- "/var/log/udev",
- "/var/log/boot*",
- "/var/log/dmesg*",
- "/var/log/kern*",
- "/var/log/mail*",
- "/var/log/dist-upgrade",
- "/var/log/landscape",
- "/var/log/installer",
- "/var/log/unattended-upgrades",
- "/var/log/upstart"
+ "/var/log/apport.log",
+ "/var/log/syslog",
+ "/var/log/udev",
+ "/var/log/boot*",
+ "/var/log/dmesg*",
+ "/var/log/kern*",
+ "/var/log/mail*",
+ "/var/log/dist-upgrade",
+ "/var/log/landscape",
+ "/var/log/installer",
+ "/var/log/unattended-upgrades",
+ "/var/log/upstart"
])
diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
index 8e1fb295..a7e07a80 100644
--- a/sos/plugins/networking.py
+++ b/sos/plugins/networking.py
@@ -34,8 +34,8 @@ class Networking(Plugin):
out=[]
for line in brctl_out[1].splitlines():
if line.startswith("bridge name") \
- or line.isspace() \
- or line[:1].isspace():
+ or line.isspace() \
+ or line[:1].isspace():
continue
br_name, br_rest = line.split(None, 1)
out.append(br_name)
@@ -76,10 +76,10 @@ class Networking(Plugin):
"/etc/xinetd.d",
"/etc/host*",
"/etc/resolv.conf"
- "/etc/network*",
- "/etc/NetworkManager/NetworkManager.conf",
- "/etc/NetworkManager/system-connections",
- "/etc/dnsmasq*"])
+ "/etc/network*",
+ "/etc/NetworkManager/NetworkManager.conf",
+ "/etc/NetworkManager/system-connections",
+ "/etc/dnsmasq*"])
ip_addr_file=self.get_cmd_output_now("ip -o addr", root_symlink = "ip_addr")
ip_addr_out=self.call_ext_prog("ip -o addr")
@@ -121,9 +121,9 @@ class Networking(Plugin):
return
def postproc(self):
- for root, dirs, files in os.walk("/etc/NetworkManager/system-connections"):
- for net_conf in files:
- self.do_file_sub("/etc/NetworkManager/system-connections/"+net_conf, r"psk=(.*)",r"psk=***")
+ for root, dirs, files in os.walk("/etc/NetworkManager/system-connections"):
+ for net_conf in files:
+ self.do_file_sub("/etc/NetworkManager/system-connections/"+net_conf, r"psk=(.*)",r"psk=***")
class RedHatNetworking(Networking, RedHatPlugin):
"""network related information for RedHat based distribution
@@ -142,8 +142,8 @@ class UbuntuNetworking(Networking, UbuntuPlugin):
self.add_copy_specs([
"/etc/resolvconf",
- "/etc/ufw",
- "/var/log/ufw.Log",
+ "/etc/ufw",
+ "/var/log/ufw.Log",
"/etc/resolv.conf"])
self.add_cmd_output("/usr/sbin/ufw status")
self.add_cmd_output("/usr/sbin/ufw app list")