devpi.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:shift-detect 作者: paolodedios 项目源码 文件源码
def run_devpi_command(project, logger, params) :
    reports_dir = project.expand_path("$dir_reports/devpi")
    if not os.path.exists(reports_dir) :
        os.mkdir(reports_dir)

    logger.debug("Executing devpi command %s", params)

    output_file_path = os.path.join(reports_dir, params[0].replace("/", ""))

    with open(output_file_path, "w") as output_file :
        commandexec = ["devpi"]
        commandexec.extend(params)
        working_dir = project.expand_path("$dir_dist")
        process     = subprocess.Popen(commandexec, cwd=working_dir, stdout=output_file, stderr=output_file, shell=False)
        return_code = process.wait()
        if return_code != 0 :
            raise BuildFailedException("Error while executing devpi command %s, see %s for details" % (params, output_file_path))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号