You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/04/17 08:15:31 UTC

incubator-airflow git commit: [AIRFLOW-1107] Add support for ftps non-default port

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 <je...@groupalia.com>
Authored: Mon Apr 17 10:15:17 2017 +0200
Committer: Bolke de Bruin <bo...@xs4all.nl>
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