gateway_bootstrap.py 文件源码

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

项目:execnet 作者: pytest-dev 项目源码 文件源码
def bootstrap_exec(io, spec):
    try:
        sendexec(
            io,
            inspect.getsource(gateway_base),
            "execmodel = get_execmodel(%r)" % spec.execmodel,
            'io = init_popen_io(execmodel)',
            "io.write('1'.encode('ascii'))",
            "serve(io, id='%s-slave')" % spec.id,
        )
        s = io.read(1)
        assert s == "1".encode('ascii')
    except EOFError:
        ret = io.wait()
        if ret == 255:
            raise HostNotFound(io.remoteaddress)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号