aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-22 19:42:16 +0000
committerpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-22 19:42:16 +0000
commit44819e7ec65c73c626608b3f438a5bf4dae18571 (patch)
tree5fb8b9a615b39225f963da3e3c05544a543f76b5
parente45f5ad25df9d31ffd6c870419de1f9aed4859b2 (diff)
downloadsos-44819e7ec65c73c626608b3f438a5bf4dae18571.tar.gz
O.M.G.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1022 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r--sos/plugins/general.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/sos/plugins/general.py b/sos/plugins/general.py
index a165c8d2..c4661a69 100644
--- a/sos/plugins/general.py
+++ b/sos/plugins/general.py
@@ -54,16 +54,11 @@ class general(sos.plugintools.PluginBase):
if self.getOption('all_logs'):
rhelver = self.policy().rhelVersion()
- if rhelver == 5 or rhelver == 4:
- logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/syslog.conf")
- for i in logs:
- if not os.path.isfile(i): continue
- self.addCopySpec(i)
-
- if rhelver == 6:
- logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/rsyslog.conf")
- for i in logs:
- if not os.path.isfile(i): continue
+ logconf = (rhelver in (4, 5)) and "/etc/syslog.conf" \
+ or "/etc/rsyslog.conf"
+ logs = self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", logconf)
+ for i in logs:
+ if os.path.isfile(i):
self.addCopySpec(i)
def postproc(self):