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 2020/04/26 03:51:11 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #8533: Stop DockerSwarmOperator from pulling Docker images

mik-laj commented on a change in pull request #8533:
URL: https://github.com/apache/airflow/pull/8533#discussion_r415206235



##########
File path: airflow/providers/docker/operators/docker.py
##########
@@ -289,6 +279,18 @@ def execute(self, context):
 
         return self._run_image()
 
+    def _set_cli(self):
+        tls_config = self.__get_tls_config()
+
+        if self.docker_conn_id:
+            self.cli = self.get_hook().get_conn()
+        else:
+            self.cli = APIClient(

Review comment:
       ```suggestion
       def _set_cli(self):
           if self.docker_conn_id:
               self.cli = self.get_hook().get_conn()
           else:
               tls_config = self.__get_tls_config()
               self.cli = APIClient(
   ```
   The first case is easier to understand when reading the code.




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