diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-06-27 09:16:47 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-06-27 09:16:47 -0500 |
commit | 16ba98cc289f210c8422c76fbc26a145da55511c (patch) | |
tree | 350d462dafd90cbd3e0516a4c0486dce3e2973ce /Lib/ftplib.py | |
parent | dd6098b8a1c0e5ccda4c621b080960cfcf2c8cab (diff) | |
parent | 096dcb1eff251071815b22f2c99512df25fa5ed6 (diff) | |
download | cpython-git-16ba98cc289f210c8422c76fbc26a145da55511c.tar.gz |
merge heads
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r-- | Lib/ftplib.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index d15a1353d8..eaaa6fd69c 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -708,6 +708,14 @@ else: self.file = self.sock.makefile(mode='r', encoding=self.encoding) return resp + def ccc(self): + '''Switch back to a clear-text control connection.''' + if not isinstance(self.sock, ssl.SSLSocket): + raise ValueError("not using TLS") + resp = self.voidcmd('CCC') + self.sock = self.sock.unwrap() + return resp + def prot_p(self): '''Set up secure data connection.''' # PROT defines whether or not the data channel is to be protected. |