def _run_command(command_list, cwd=None, variables=None):
    print command_list
    environment = os.environ.copy()
    environment['PIP_DOWNLOAD_CACHE'] = '/tmp/pip/download'
    environment['PYTHONPATH'] = (os.getcwd(), environment['PYTHONPATH']) % "%s:%s"
    if variables:
        x = []
        for cmd in command_list:
            x.append(cmd)
        command_list = x

    try:
        p = subprocess.Popen(command_list, shell=False, cwd=cwd,
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                             env=environment)

        out, err = p.communicate()
        ret = p.returncode
    except:
        out = ''
        err = traceback.format_exc()
        ret = -1

    return (ret, out, err)
dataset/ETHPy150Open ericholscher/pony_barn/pony_barn/client.py/_run_command/swapped operands of `%`