From bd554a6feab9945281c340effa0226e1fb6ecb2e Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Fri, 3 Jul 2015 10:29:26 -0400 Subject: [PATCH] Fix race condition in docker-compose up. Signed-off-by: Daniel Nephin --- compose/cli/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compose/cli/main.py b/compose/cli/main.py index 4bde658e6..ae91eeb5f 100644 --- a/compose/cli/main.py +++ b/compose/cli/main.py @@ -453,7 +453,7 @@ class TopLevelCommand(Command): service_names = options['SERVICE'] timeout = float(options.get('--timeout') or DEFAULT_TIMEOUT) - project.up( + to_attach = project.up( service_names=service_names, start_deps=start_deps, allow_recreate=allow_recreate, @@ -463,8 +463,6 @@ class TopLevelCommand(Command): timeout=timeout ) - to_attach = [c for s in project.get_services(service_names) for c in s.containers()] - if not detached: print("Attaching to", list_containers(to_attach)) log_printer = LogPrinter(to_attach, attach_params={"logs": True}, monochrome=monochrome)