Module pipelines.rj_smtr.implicit_ftp
Classes
class ImplicitFtpTls (*args, **kwargs)
-
FTP_TLS subclass that automatically wraps sockets in SSL to support implicit FTPS.
Initialization method (called by class instantiation). Initialize host to localhost, port to standard ftp port. Optional arguments are host (for connect()), and user, passwd, acct (for login()).
Expand source code
class ImplicitFtpTls(ftplib.FTP_TLS): """FTP_TLS subclass that automatically wraps sockets in SSL to support implicit FTPS.""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._sock = None @property def sock(self): """Return the socket.""" return self._sock @sock.setter def sock(self, value): """When modifying the socket, ensure that it is ssl wrapped.""" if value is not None and not isinstance(value, ssl.SSLSocket): value = self.context.wrap_socket(value) self._sock = value
Ancestors
- ftplib.FTP_TLS
- ftplib.FTP
Instance variables
prop sock
-
Return the socket.
Expand source code
@property def sock(self): """Return the socket.""" return self._sock