Skip to content

Commit 8a747b2

Browse files
committed
raise runtime error instead
1 parent 82b20c0 commit 8a747b2

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

camel/toolkits/terminal_toolkit/terminal_toolkit.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -190,26 +190,10 @@ def __init__(
190190
f"'{docker_container_name}'."
191191
)
192192
except NotFound:
193-
logger.info(
193+
raise RuntimeError(
194194
f"Container '{docker_container_name}' not found. "
195-
f"Creating a new container..."
196195
)
197196

198-
self.container = self.docker_client.containers.run(
199-
image='python:3.11-slim', # using for lightweight
200-
name=docker_container_name,
201-
detach=True,
202-
tty=True,
203-
stdin_open=True,
204-
working_dir=self.docker_workdir
205-
if hasattr(self, 'docker_workdir')
206-
else '/workspace',
207-
command='/bin/bash',
208-
)
209-
logger.info(
210-
f"Successfully created and started Docker container "
211-
f"'{docker_container_name}'."
212-
)
213197
# Ensure the working directory exists inside the container
214198
if self.docker_workdir:
215199
try:

0 commit comments

Comments
 (0)