vincbeck commented on code in PR #39465:
URL: https://github.com/apache/airflow/pull/39465#discussion_r1599058827
##########
airflow/providers/ftp/hooks/ftp.py:
##########
@@ -58,7 +58,11 @@ def get_conn(self) -> ftplib.FTP:
if self.conn is None:
params = self.get_connection(self.ftp_conn_id)
pasv = params.extra_dejson.get("passive", True)
- self.conn = ftplib.FTP(params.host, params.login, params.password)
# nosec: B321
+ self.conn = ftplib.FTP() # nosec: B321
+ if params.host:
+ self.conn.connect(params.host, params.port)
+ if params.login:
+ self.conn.login(params.login, params.password)
Review Comment:
Can `params.login` be provided but not `params.host`? If yes, then there is
an indentention issue
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]