Update old utils paths to new utils paths

This commit is contained in:
rallytime 2018-06-30 09:34:47 -04:00
parent c4fd2a0930
commit 047f5b5f39
No known key found for this signature in database
GPG Key ID: E8F1A4B90D0DEA19

View File

@ -255,7 +255,7 @@ def _disable(name, started, result=True, **kwargs):
return ret
# Service can be disabled
if salt.utils.is_windows():
if salt.utils.platform.is_windows():
# service.disabled in Windows returns True for services that are set to
# Manual start, so we need to check specifically for Disabled
before_toggle_disable_status = __salt__['service.info'](name)['StartType'] in ['Disabled']
@ -561,7 +561,7 @@ def dead(name,
# command, so it is just an indicator but can not be fully trusted
before_toggle_status = __salt__['service.status'](name, sig)
if 'service.enabled' in __salt__:
if salt.utils.is_windows():
if salt.utils.platform.is_windows():
# service.enabled in Windows returns True for services that are set
# to Auto start, but services set to Manual can also be disabled
before_toggle_enable_status = __salt__['service.info'](name)['StartType'] in ['Auto', 'Manual']