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 2021/02/05 04:09:31 UTC

[GitHub] [airflow] dstandish commented on a change in pull request #13793: Fix returning last log line in docker operator

dstandish commented on a change in pull request #13793:
URL: https://github.com/apache/airflow/pull/13793#discussion_r570707630



##########
File path: airflow/providers/docker/operators/docker.py
##########
@@ -269,14 +269,17 @@ def _run_image(self) -> Optional[str]:
             # duplicated conditional logic because of expensive operation
             ret = None
             if self.do_xcom_push:
-                ret = self.cli.logs(container=self.container['Id']) if self.xcom_all else line.encode('utf-8')
+                if self.xcom_all:
+                    ret = self.cli.logs(container=self.container['Id'])

Review comment:
       why not strip here also?




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

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