Repository: incubator-airflow
Updated Branches:
  refs/heads/master 4fb05d8cc -> 4d0c2f647


[AIRFLOW-1107] Add support for ftps non-default port

Closes #2240 from jesusfcr/ftps


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/4d0c2f64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/4d0c2f64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/4d0c2f64

Branch: refs/heads/master
Commit: 4d0c2f647289b441ae09dd17a06e5868367580ff
Parents: 4fb05d8
Author: Jesús Carpintero <[email protected]>
Authored: Mon Apr 17 10:15:17 2017 +0200
Committer: Bolke de Bruin <[email protected]>
Committed: Mon Apr 17 10:15:17 2017 +0200

----------------------------------------------------------------------
 airflow/contrib/hooks/ftp_hook.py | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/4d0c2f64/airflow/contrib/hooks/ftp_hook.py
----------------------------------------------------------------------
diff --git a/airflow/contrib/hooks/ftp_hook.py 
b/airflow/contrib/hooks/ftp_hook.py
index 2f2e4c2..9e12c59 100644
--- a/airflow/contrib/hooks/ftp_hook.py
+++ b/airflow/contrib/hooks/ftp_hook.py
@@ -237,7 +237,12 @@ class FTPSHook(FTPHook):
         """
         if self.conn is None:
             params = self.get_connection(self.ftp_conn_id)
+
+            if params.port:
+               ftplib.FTP_TLS.port=params.port
+
             self.conn = ftplib.FTP_TLS(
                 params.host, params.login, params.password
             )
+
         return self.conn

Reply via email to