Skip to content

Commit e19819b

Browse files
committed
FTPFS: Add FTPS support to the FTPFS opener.
Enable TLS when using the ftps:// protocol
1 parent 515ca26 commit e19819b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/opener/ftpfs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class FTPOpener(Opener):
2424
"""`FTPFS` opener."""
2525

26-
protocols = ["ftp"]
26+
protocols = ["ftp", "ftps"]
2727

2828
@CreateFailed.catch_all
2929
def open_fs(
@@ -48,6 +48,7 @@ def open_fs(
4848
passwd=parse_result.password,
4949
proxy=parse_result.params.get("proxy"),
5050
timeout=int(parse_result.params.get("timeout", "10")),
51+
tls=bool(parse_result.protocol == "ftps"),
5152
)
5253
if dir_path:
5354
if create:

0 commit comments

Comments
 (0)