aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-15 16:37:43 +0000
committerpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-15 16:37:43 +0000
commitc38ee45016f4678d0b30c6d1a01b90e67b451fcf (patch)
tree599a71a8a8ff79ee693dd13d18ad7ff5a712183f
parent0b4a2a994e7df0f578355a4284675fc412a09c50 (diff)
downloadsos-c38ee45016f4678d0b30c6d1a01b90e67b451fcf.tar.gz
rhelVersion() returns 6 under both RHEL6beta & GA
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@996 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rwxr-xr-xsos/policyredhat.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sos/policyredhat.py b/sos/policyredhat.py
index c6bdddfb..863445ae 100755
--- a/sos/policyredhat.py
+++ b/sos/policyredhat.py
@@ -153,12 +153,14 @@ class SosPolicy:
def rhelVersion(self):
try:
- pkgname = self.pkgByName("redhat-release")["version"]
+ pkg = self.pkgByName("redhat-release") or \
+ self.allPkgsByNameRegex("redhat-release-.*")[-1]
+ pkgname = pkg["version"]
if pkgname[0] == "4":
return 4
elif pkgname in [ "5Server", "5Client" ]:
return 5
- elif pkgname == "6":
+ elif pkgname[0] == "6":
return 6
except: pass
return False