diff options
author | Bastian Venthur <bastian.venthur@flixbus.com> | 2020-01-08 10:04:38 +0100 |
---|---|---|
committer | Bastian Venthur <bastian.venthur@flixbus.com> | 2020-06-03 17:43:56 +0200 |
commit | 0263d3ec3714131acaa17900c6d620a5a2064c7c (patch) | |
tree | 3d1c11986ed1c33fd4477367f743dcb7e41e0058 | |
parent | c44746d92d696d64386145216b605733d2e12a37 (diff) |
Removed now unused get_output_stream method
Signed-off-by: Bastian Venthur <bastian.venthur@flixbus.com>
-rw-r--r-- | compose/cli/log_printer.py | 3 | ||||
-rw-r--r-- | compose/parallel.py | 3 | ||||
-rw-r--r-- | compose/progress_stream.py | 2 | ||||
-rw-r--r-- | compose/utils.py | 4 |
4 files changed, 3 insertions, 9 deletions
diff --git a/compose/cli/log_printer.py b/compose/cli/log_printer.py index fd193000..100f3a82 100644 --- a/compose/cli/log_printer.py +++ b/compose/cli/log_printer.py @@ -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 {} diff --git a/compose/parallel.py b/compose/parallel.py index 6ef9ceed..15c3ad57 100644 --- a/compose/parallel.py +++ b/compose/parallel.py @@ -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 diff --git a/compose/progress_stream.py b/compose/progress_stream.py index 0ae0dc31..8792ff28 100644 --- a/compose/progress_stream.py +++ b/compose/progress_stream.py @@ -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 diff --git a/compose/utils.py b/compose/utils.py index 9170abc1..8b5ab38d 100644 --- a/compose/utils.py +++ b/compose/utils.py @@ -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. |