Comment on log streaming for docker ce 17 and 18

This commit is contained in:
Einar Forselv 2019-12-08 00:08:41 +01:00
parent e2dec9ffa0
commit d89ed781ef
1 changed files with 2 additions and 2 deletions

View File

@ -35,8 +35,8 @@ def run(image: str = None, command: str = None, volumes: dict = None,
line = ""
while True:
try:
# TODO: figure out why..
# Apparently the stream can be bytes or strings.
# Make log streaming work for docker ce 17 and 18.
# For some reason strings are returned instead if bytes.
data = next(stream)
if isinstance(data, bytes):
line += data.decode()