Merge pull request #309 from epoelke/develop

Updated yumpkg.py and yumpkg5.py to reflect SEJeff's changes to grains.
This commit is contained in:
Thomas S Hatch 2011-12-01 22:17:52 -08:00
commit 10d37cec2a
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ def __virtual__():
# python <= 2.6
dists = 'CentOS Scientific RedHat Fedora'
if dists.count(__grains__['os']):
if int(__grains__['release'].split('.')[0]) >= 6:
if int(__grains__['osrelease'].split('.')[0]) >= 6:
return 'pkg'
else:
return False

View File

@ -8,7 +8,7 @@ def __virtual__():
# We don't need to support pre-yum OSes because they don't support python 2.6
dists = 'CentOS Scientific RedHat Fedora'
if dists.count(__grains__['os']):
if int(__grains__['release'].split('.')[0]) == 5:
if int(__grains__['osrelease'].split('.')[0]) == 5:
return 'pkg'
else:
return False