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 19:08:34 UTC

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

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



##########
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:
       Huh.  Interesting.  If it works, it works.  Took me a minute to figure out HOW it worked, but I see it. :+1: 




-- 
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