Removed now unused get_output_stream method

Signed-off-by: Bastian Venthur <bastian.venthur@flixbus.com>
This commit is contained in:
Bastian Venthur 2020-01-08 10:04:38 +01:00
parent c44746d92d
commit 0263d3ec37
4 changed files with 3 additions and 9 deletions

View File

@ -9,7 +9,6 @@ from threading import Thread
from docker.errors import APIError
from . import colors
from compose import utils
from compose.cli.signals import ShutdownException
from compose.utils import split_buffer
@ -64,7 +63,7 @@ class LogPrinter(object):
self.containers = containers
self.presenters = presenters
self.event_stream = event_stream
self.output = utils.get_output_stream(output)
self.output = output
self.cascade_stop = cascade_stop
self.log_args = log_args or {}

View File

@ -18,7 +18,6 @@ from compose.const import PARALLEL_LIMIT
from compose.errors import HealthCheckFailed
from compose.errors import NoHealthCheckConfigured
from compose.errors import OperationFailedError
from compose.utils import get_output_stream
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)
"""
objects = list(objects)
stream = get_output_stream(sys.stderr)
stream = sys.stderr
if ParallelStreamWriter.instance:
writer = ParallelStreamWriter.instance

View File

@ -15,7 +15,7 @@ def write_to_stream(s, stream):
def stream_output(output, stream):
is_terminal = hasattr(stream, 'isatty') and stream.isatty()
stream = utils.get_output_stream(stream)
stream = stream
lines = {}
diff = 0

View File

@ -16,10 +16,6 @@ json_decoder = json.JSONDecoder()
log = logging.getLogger(__name__)
def get_output_stream(stream):
return stream
def stream_as_text(stream):
"""Given a stream of bytes or text, if any of the items in the stream
are bytes convert them to text.