brokenjacobs commented on a change in pull request #8287:
URL: https://github.com/apache/airflow/pull/8287#discussion_r412141692



##########
File path: airflow/providers/docker/operators/docker.py
##########
@@ -280,9 +279,10 @@ def execute(self, context):
         # Pull the docker image if `force_pull` is set or image does not exist 
locally
         if self.force_pull or not self.cli.images(name=self.image):
             self.log.info('Pulling docker image %s', self.image)
-            for line in self.cli.pull(self.image, stream=True, decode=True):
-                output = json.loads(line.decode('utf-8').strip())
-                if 'status' in output:
+            for output in self.cli.pull(self.image, stream=True, decode=True):
+                if isinstance(output, str):
+                    self.log.info("%s", output)
+                if isinstance(output, dict) and 'status' in output:

Review comment:
       I’m guessing he put it in because the docker api docs don’t state that a 
dict is returned even though one actually is. This way if they decide to ‘fix’ 
it, it will still work.




----------------------------------------------------------------
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:
[email protected]


Reply via email to