Skip to content

Commit

Permalink
Added handling for string on and off
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy committed Jan 28, 2016
1 parent a520733 commit 602389f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions salt/modules/mac_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 602389f

Please sign in to comment.