MCPcopy Create free account
hub / github.com/dagger/dagger / start_cli_session_sync

Function start_cli_session_sync

sdk/python/src/dagger/provisioning/_session.py:76–86  ·  view source on GitHub ↗

Start an engine session with a provided CLI path.

(cfg: Config, path: str)

Source from the content-addressed store, hash-verified

74
75@contextlib.contextmanager
76def start_cli_session_sync(cfg: Config, path: str):
77 """Start an engine session with a provided CLI path."""
78 logger.debug("Starting session using %s", path)
79 try:
80 with contextlib.ExitStack() as stack:
81 session = stack.enter_context(run(cfg, path))
82 params = get_connect_params(session)
83 stack.push(Pclose(session.proc))
84 yield params
85 except (OSError, ValueError, TypeError) as e:
86 raise SessionError(e) from e
87
88
89def _has_fileno(stream: TextIO) -> bool:

Callers 1

start_cli_sessionFunction · 0.85

Calls 5

get_connect_paramsFunction · 0.85
PcloseClass · 0.85
SessionErrorClass · 0.85
runFunction · 0.70
debugMethod · 0.45

Tested by

no test coverage detected