diff options
Diffstat (limited to 'compose/cli/log_printer.py')
-rw-r--r-- | compose/cli/log_printer.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compose/cli/log_printer.py b/compose/cli/log_printer.py index 8aa93a84..6940a74c 100644 --- a/compose/cli/log_printer.py +++ b/compose/cli/log_printer.py @@ -230,7 +230,13 @@ def watch_events(thread_map, event_stream, presenters, thread_args): # Container crashed so we should reattach to it if event['id'] in crashed_containers: - event['container'].attach_log_stream() + container = event['container'] + if not container.is_restarting: + try: + container.attach_log_stream() + except APIError: + # Just ignore errors when reattaching to already crashed containers + pass crashed_containers.remove(event['id']) thread_map[event['id']] = build_thread( |