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_r212443735
 
 

 ##########
 File path: airflow/contrib/operators/sftp_operator.py
 ##########
 @@ -77,13 +81,19 @@ def __init__(self,
     def execute(self, context):
         file_msg = None
         try:
-            if self.ssh_conn_id and not self.ssh_hook:
-                self.ssh_hook = SSHHook(ssh_conn_id=self.ssh_conn_id)
+            if self.ssh_conn_id:
+                if self.ssh_hook:
 
 Review comment:
   And I wonder we should check the self.ssh_hook is an instance for SSHHook.

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