moved distutils import to mac, darn solaris would complain in certain cases

This commit is contained in:
Brian Coca 2015-11-02 15:11:26 -05:00
parent 99d775a0c1
commit e9efd008ed

View file

@ -37,7 +37,6 @@ import ConfigParser
import StringIO import StringIO
from string import maketrans from string import maketrans
from distutils.version import LooseVersion
try: try:
import selinux import selinux
@ -557,6 +556,7 @@ class Facts(object):
# start with the easy ones # start with the easy ones
elif self.facts['distribution'] == 'MacOSX': elif self.facts['distribution'] == 'MacOSX':
#FIXME: find way to query executable, version matching is not ideal #FIXME: find way to query executable, version matching is not ideal
from distutils.version import LooseVersion
if LooseVersion(platform.mac_ver()[0]) >= LooseVersion('10.4'): if LooseVersion(platform.mac_ver()[0]) >= LooseVersion('10.4'):
self.facts['service_mgr'] = 'launchd' self.facts['service_mgr'] = 'launchd'
else: else: