We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 831979c commit 89d9f7bCopy full SHA for 89d9f7b
1 file changed
fs/ftpfs.py
@@ -18,7 +18,7 @@
18
try:
19
from ftplib import FTP_TLS
20
except ImportError as err:
21
- FTP_TLS = err
+ FTP_TLS = err # type: ignore
22
from ftplib import error_perm
23
from ftplib import error_temp
24
from typing import cast
@@ -472,8 +472,10 @@ def _open_ftp(self):
472
with ftp_errors(self):
473
_ftp.connect(self.host, self.port, self.timeout)
474
_ftp.login(self.user, self.passwd, self.acct)
475
- if self.tls:
+ try:
476
_ftp.prot_p()
477
+ except AttributeError:
478
+ pass
479
self._features = {}
480
481
feat_response = _decode(_ftp.sendcmd("FEAT"), "latin-1")
0 commit comments