def get_sleep_on_power_button():
 ret = salt.utils.mac_utils.execute_return_result('systemsetup -getallowpowerbuttontosleepcomputer')
 return (salt.utils.mac_utils.validate_enabled(salt.utils.mac_utils.parse_return(ret)) == 'on')

def get_sleep_on_power_button ( ) : ret = salt . utils . mac_utils . execute_return_result ( 'systemsetup -getallowpowerbuttontosleepcomputer' ) return ( salt . utils . mac_utils . validate_enabled ( salt . utils . mac_utils . parse_return ( ret ) ) == 'on' )
displays whether allow power button to sleep computer is on or off if supported :return: a string value representing the "allow power button to sleep computer" settings :rtype: string cli example: .