MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / __enter__

Method __enter__

camel/runtime/docker_runtime.py:380–391  ·  view source on GitHub ↗

r"""Enter the context manager. Returns: DockerRuntime: The DockerRuntime instance.

(self)

Source from the content-addressed store, hash-verified

378 return False
379
380 def __enter__(self) -> "DockerRuntime":
381 r"""Enter the context manager.
382
383 Returns:
384 DockerRuntime: The DockerRuntime instance.
385 """
386 if not self.container:
387 return self.build()
388 logger.warning(
389 "Container already exists. Returning existing container."
390 )
391 return self
392
393 def __exit__(self, exc_type, exc_val, exc_tb):
394 r"""Exit the context manager."""

Callers

nothing calls this directly

Calls 1

buildMethod · 0.95

Tested by

no test coverage detected