Beispiel #1
0
def unset_group(agent_id, quiet=False):
    ans = 'n'
    if not quiet:
         ans = get_stdin("Do you want to unset the current group of agent '{0}'? [y/N]: ".format(agent_id))
    else:
        ans = 'y'

    if ans.lower() == 'y':
        msg = Agent.unset_group(agent_id)
    else:
        msg = "Cancelled."

    print(msg)
Beispiel #2
0
def unset_group(agent_id, group_id=None, quiet=False):
    ans = 'n'
    if not quiet:
        if group_id:
            ans = get_stdin(
                "Do you want to delete the group '{0}' of agent '{1}'? [y/N]: "
                .format(group_id, agent_id))
        else:
            ans = get_stdin(
                "Do you want to delete all groups of agent '{0}'? [y/N]: ".
                format(agent_id))
    else:
        ans = 'y'

    if ans.lower() == 'y':
        msg = Agent.unset_group(agent_id, group_id)
    else:
        msg = "Cancelled."

    print(msg)