def run_alias(alias, args):
    """Run the alias with the given arguments, after expanding parameters.

    Parameter expansion is done by the replace_arguments function.
    """
    cmd, use_shell = expand_alias(alias, args)

    try:
        if use_shell:
            # If we are using the shell, we must provide our program as a
            # string instead of a sequence.
            cmd = subprocess.list2cmdline(cmd)

        return subprocess.call(cmd, shell=use_shell)
    except __HOLE__ as e:
        logging.error('Could not execute alias "%s"; it was malformed: %s',
                      alias, e)

    return 1
dataset/ETHPy150Open reviewboard/rbtools/rbtools/utils/aliases.py/run_alias