Skip to content

Commit 256c7a7

Browse files
committed
Fix logging if instance is not a DockerContainer.
1 parent fcdd367 commit 256c7a7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core/testcontainers/core/waiting_utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,15 @@ def wait_container_is_ready(*transient_exceptions):
4242

4343
@wrapt.decorator
4444
def wrapper(wrapped, instance, args, kwargs):
45+
from .container import DockerContainer
46+
47+
if isinstance(instance, DockerContainer):
48+
logger.info("Waiting for container %s with image %s to be ready ...",
49+
instance._container, instance.image)
50+
else:
51+
logger.info("Waiting for %s to be ready ...", instance)
52+
4553
exception = None
46-
logger.info("Waiting for container %s with image %s to be ready...", instance._container,
47-
instance.image)
4854
for attempt_no in range(config.MAX_TRIES):
4955
try:
5056
return wrapped(*args, **kwargs)

0 commit comments

Comments
 (0)