

def _get_assistive_access():
    '\n    Get a list of all of the assistive access applications installed,\n    returns as a ternary showing whether each app is enabled or not.\n    '
    cmd = 'sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db" "SELECT * FROM access"'
    call = __salt__['cmd.run_all'](cmd, output_loglevel='debug', python_shell=False)
    if (call['retcode'] != 0):
        comment = ''
        if ('stderr' in call):
            comment += call['stderr']
        if ('stdout' in call):
            comment += call['stdout']
        raise CommandExecutionError('Error: {0}'.format(comment))
    out = call['stdout']
    return re.findall('kTCCServiceAccessibility\\|(.*)\\|[0-9]{1}\\|([0-9]{1})\\|[0-9]{1}\\|', out, re.MULTILINE)

dataset/ETHPy150Open saltstack/salt/salt/modules/mac_assistive.py _get_assistive_access/original