def get_pool(arg = None, opts = None, abort = False):
    """ Returns pool to work with

        Returns a pynipap.Pool object representing the pool we are working with.
    """
    # yep, global variables are evil
    global pool

    try:
        pool = Pool.list({ 'name': arg })[0]
    except __HOLE__:
        if abort:
            print >> sys.stderr, "Pool '%s' not found." % str(arg)
            sys.exit(1)
        else:
            pool = None

    return pool
dataset/ETHPy150Open SpriteLink/NIPAP/nipap-cli/nipap_cli/nipap_cli.py/get_pool