From 9b64bea8fa7f169af4ee31bb99052a190c6dc0ec Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 22 Mar 2013 19:28:14 +0000 Subject: Fix Fedora policy detection Make sure that the Fedora policy gets a chance to run by checking for the absence of /etc/fedora-release in the RHEL policy and fix the inheritance of FedoraPolicy. Signed-off-by: Bryn M. Reeves --- sos/policies/redhat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py index 89c7fd26..399db6f7 100644 --- a/sos/policies/redhat.py +++ b/sos/policies/redhat.py @@ -106,7 +106,8 @@ No changes will be made to system configuration. def check(self): """This method checks to see if we are running on RHEL. It returns True or False.""" - return (os.path.isfile('/etc/redhat-release')) + return (os.path.isfile('/etc/redhat-release') + and not os.path.isfile('/etc/fedora-release')) def rhelVersion(self): try: @@ -135,7 +136,7 @@ No changes will be made to system configuration. def getLocalName(self): return self.rhnUsername() or self.hostName() -class FedoraPolicy(LinuxPolicy): +class FedoraPolicy(RedHatPolicy): distro = "Fedora" vendor = "the Fedora Project" -- cgit