You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/08 17:30:15 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #21429: Fix docker behaviour with byte lines returned

potiuk commented on a change in pull request #21429:
URL: https://github.com/apache/airflow/pull/21429#discussion_r801888484



##########
File path: airflow/providers/docker/operators/docker.py
##########
@@ -35,6 +35,15 @@
     from airflow.utils.context import Context
 
 
+def stringify(line: Union[str, bytes]):
+    """Make sure string is returned even if bytes are passed. Docker stream can return bytes."""
+    decode_method = getattr(line, 'decode', None)

Review comment:
       This looks a bit weird but is the cleanest way to make MyPy happy: https://github.com/python/mypy/issues/1424




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org