Added handling for string on and off

This commit is contained in:
twangboy 2016-01-28 16:02:46 -07:00
parent a520733a9b
commit 602389f171

View File

@ -132,8 +132,10 @@ def _validate_enabled(enabled):
'String values must be \'on\' or \'off\'.\n' \
'Passed: {0}'.format(enabled)
raise SaltInvocationError(msg)
else:
return 'on' if bool(enabled) else 'off'
return enabled.lower()
return 'on' if bool(enabled) else 'off'
def get_sleep():