sos/sos-bz622528-redhat-release-6-fixes.patch

21 lines
801 B
Diff
Raw Normal View History

diff -up sos-2.2/sos/policyredhat.py.orig sos-2.2/sos/policyredhat.py
--- sos-2.2/sos/policyredhat.py.orig 2011-02-03 20:24:14.000000000 +0000
+++ sos-2.2/sos/policyredhat.py 2011-02-03 20:24:51.000000000 +0000
@@ -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