From 44819e7ec65c73c626608b3f438a5bf4dae18571 Mon Sep 17 00:00:00 2001 From: pcarrier Date: Mon, 22 Nov 2010 19:42:16 +0000 Subject: O.M.G. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1022 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- sos/plugins/general.py | 15 +++++---------- 1 file 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): -- cgit