Skip to content

Commit

Permalink
another fix of issue #2111
Browse files Browse the repository at this point in the history
on Debian wheezy, salt-call -g |grep os_family
gives:
   os_family: debian

Which means that apt will not be used
(it checks os_family for 'Debian').

so i added  debian -> Debian into _OS_FAMILY_MAP

... this patch also contains 2 little pep8  fixes
  • Loading branch information
David Pravec authored and thatch45 committed Dec 18, 2012
1 parent 98d146a commit 0fe1084
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion salt/grains/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ def _ps(osdata):
grains['ps'] = 'ps -efH'
return grains


def _windows_platform_data(osdata):
'''
Use the platform module for as much as we can.
Expand Down Expand Up @@ -457,6 +458,7 @@ def id_():

# Map the 'os' grain to the 'os_family' grain
_OS_FAMILY_MAP = {
'debian': 'Debian',
'Ubuntu': 'Debian',
'Fedora': 'RedHat',
'CentOS': 'RedHat',
Expand Down Expand Up @@ -555,7 +557,7 @@ def os_data():
grains['lsb_distrib_id'] = value.strip()
# Use the already intelligent platform module to get distro info
(osname, osrelease, oscodename) = platform.linux_distribution(
supported_dists=_supported_dists)
supported_dists=_supported_dists)
# Try to assign these three names based on the lsb info, they tend to
# be more accurate than what python gets from /etc/DISTRO-release.
# It's worth noting that Ubuntu has patched their Python distribution
Expand Down

0 comments on commit 0fe1084

Please sign in to comment.