mirror of
https://github.com/docker/compose.git
synced 2025-07-23 05:34:36 +02:00
Removed now unused get_output_stream method
Signed-off-by: Bastian Venthur <bastian.venthur@flixbus.com>
This commit is contained in:
parent
c44746d92d
commit
0263d3ec37
@ -9,7 +9,6 @@ from threading import Thread
|
|||||||
from docker.errors import APIError
|
from docker.errors import APIError
|
||||||
|
|
||||||
from . import colors
|
from . import colors
|
||||||
from compose import utils
|
|
||||||
from compose.cli.signals import ShutdownException
|
from compose.cli.signals import ShutdownException
|
||||||
from compose.utils import split_buffer
|
from compose.utils import split_buffer
|
||||||
|
|
||||||
@ -64,7 +63,7 @@ class LogPrinter(object):
|
|||||||
self.containers = containers
|
self.containers = containers
|
||||||
self.presenters = presenters
|
self.presenters = presenters
|
||||||
self.event_stream = event_stream
|
self.event_stream = event_stream
|
||||||
self.output = utils.get_output_stream(output)
|
self.output = output
|
||||||
self.cascade_stop = cascade_stop
|
self.cascade_stop = cascade_stop
|
||||||
self.log_args = log_args or {}
|
self.log_args = log_args or {}
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ from compose.const import PARALLEL_LIMIT
|
|||||||
from compose.errors import HealthCheckFailed
|
from compose.errors import HealthCheckFailed
|
||||||
from compose.errors import NoHealthCheckConfigured
|
from compose.errors import NoHealthCheckConfigured
|
||||||
from compose.errors import OperationFailedError
|
from compose.errors import OperationFailedError
|
||||||
from compose.utils import get_output_stream
|
|
||||||
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -82,7 +81,7 @@ def parallel_execute(objects, func, get_name, msg, get_deps=None, limit=None, fa
|
|||||||
in the CLI logs, but don't raise an exception (such as attempting to start 0 containers)
|
in the CLI logs, but don't raise an exception (such as attempting to start 0 containers)
|
||||||
"""
|
"""
|
||||||
objects = list(objects)
|
objects = list(objects)
|
||||||
stream = get_output_stream(sys.stderr)
|
stream = sys.stderr
|
||||||
|
|
||||||
if ParallelStreamWriter.instance:
|
if ParallelStreamWriter.instance:
|
||||||
writer = ParallelStreamWriter.instance
|
writer = ParallelStreamWriter.instance
|
||||||
|
@ -15,7 +15,7 @@ def write_to_stream(s, stream):
|
|||||||
|
|
||||||
def stream_output(output, stream):
|
def stream_output(output, stream):
|
||||||
is_terminal = hasattr(stream, 'isatty') and stream.isatty()
|
is_terminal = hasattr(stream, 'isatty') and stream.isatty()
|
||||||
stream = utils.get_output_stream(stream)
|
stream = stream
|
||||||
lines = {}
|
lines = {}
|
||||||
diff = 0
|
diff = 0
|
||||||
|
|
||||||
|
@ -16,10 +16,6 @@ json_decoder = json.JSONDecoder()
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def get_output_stream(stream):
|
|
||||||
return stream
|
|
||||||
|
|
||||||
|
|
||||||
def stream_as_text(stream):
|
def stream_as_text(stream):
|
||||||
"""Given a stream of bytes or text, if any of the items in the stream
|
"""Given a stream of bytes or text, if any of the items in the stream
|
||||||
are bytes convert them to text.
|
are bytes convert them to text.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user