mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Added handling for string on and off
This commit is contained in:
parent
a520733a9b
commit
602389f171
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user