diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-03-22 19:28:14 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-03-22 19:28:14 +0000 |
commit | 9b64bea8fa7f169af4ee31bb99052a190c6dc0ec (patch) | |
tree | f20f6d7c0d860f402cc09645cf022e40bbaaaee9 | |
parent | 7ccd5f679d8f154132e094673d0d4d6a3b39c1a7 (diff) | |
download | sos-9b64bea8fa7f169af4ee31bb99052a190c6dc0ec.tar.gz |
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 <bmr@redhat.com>
-rw-r--r-- | sos/policies/redhat.py | 5 |
1 files 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" |