def bootstrap(io, spec): if spec.popen: bootstrap_popen(io, spec) elif spec.ssh: bootstrap_ssh(io, spec) elif spec.socket: bootstrap_socket(io, spec) else: raise ValueError("unknown gateway type, cant bootstrap") gw = Gateway(io, spec.id) if hasattr(io, "popen"): # fix for jython 2.5.1 if io.popen.pid is None: io.popen.pid = gw.remote_exec("import os; channel.send(os.getpid())").receive() return gw
def bootstrap(io, spec): if spec.popen: bootstrap_popen(io, spec) elif spec.ssh: bootstrap_ssh(io, spec) elif spec.socket: bootstrap_socket(io, spec) else: raise ValueError('unknown gateway type, cant bootstrap') gw = Gateway(io, spec.id) if hasattr(io, 'popen'): # fix for jython 2.5.1 if io.popen.pid is None: io.popen.pid = gw.remote_exec( "import os; channel.send(os.getpid())").receive() return gw
def bootstrap(io, spec): if spec.popen: bootstrap_popen(io, spec) elif spec.ssh: bootstrap_ssh(io, spec) elif spec.socket: bootstrap_socket(io, spec) else: raise ValueError('unknown gateway type, cant bootstrap') gw = Gateway(io, spec) fix_pid_for_jython_popen(gw) return gw
def bootstrap(io, spec): if spec.popen: if spec.via or spec.python: bootstrap_exec(io, spec) else: bootstrap_import(io, spec) elif spec.ssh or spec.vagrant_ssh: bootstrap_exec(io, spec) elif spec.socket: bootstrap_socket(io, spec) else: raise ValueError('unknown gateway type, cant bootstrap') gw = Gateway(io, spec) fix_pid_for_jython_popen(gw) return gw