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_r212442049
##########
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:
+ 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)
Review comment:
why don't we set timeout for this hook but the one in SSHOperator?
----------------------------------------------------------------
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