feng-tao commented on a change in pull request #3793: [AIRFLOW-2948] Arg check 
& better doc - SSHOperator & SFTPOperator
URL: https://github.com/apache/incubator-airflow/pull/3793#discussion_r212441692
 
 

 ##########
 File path: airflow/contrib/operators/ssh_operator.py
 ##########
 @@ -68,14 +72,20 @@ def __init__(self,
 
     def execute(self, context):
         try:
-            if self.ssh_conn_id and not self.ssh_hook:
-                self.ssh_hook = SSHHook(ssh_conn_id=self.ssh_conn_id,
-                                        timeout=self.timeout)
+            if self.ssh_conn_id:
+                if self.ssh_hook:
+                    self.log.info("ssh_conn_id is ignored when ssh_hook is 
provided.")
+                else:
+                    self.ssh_hook = SSHHook(ssh_conn_id=self.ssh_conn_id,
+                                            timeout=self.timeout)
 
             if not self.ssh_hook:
 
 Review comment:
   same

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to