

def absent(name, host='localhost', **connection_args):
    '\n    Ensure that the named user is absent\n\n    name\n        The name of the user to remove\n    '
    ret = {
        'name': name,
        'changes': {
            
        },
        'result': True,
        'comment': '',
    }
    if __salt__['mysql.user_exists'](name, host, **connection_args):
        if __opts__['test']:
            ret['result'] = None
            ret['comment'] = 'User {0}@{1} is set to be removed'.format(name, host)
            return ret
        if __salt__['mysql.user_remove'](name, host, **connection_args):
            ret['comment'] = 'User {0}@{1} has been removed'.format(name, host)
            ret['changes'][name] = 'Absent'
            return ret
        else:
            err = _get_mysql_error()
            if (err is not None):
                ret['comment'] = err
                ret['result'] = False
                return ret
    else:
        err = _get_mysql_error()
        if (err is not None):
            ret['comment'] = ret
            ret['result'] = False
            return ret
    ret['comment'] = 'User {0}@{1} is not present, so it cannot be removed'.format(name, host)
    return ret

dataset/ETHPy150Open saltstack/salt/salt/states/mysql_user.py absent/VarMisuse@206/349 `err`->`ret`