MCPcopy Index your code
hub / github.com/python/cpython / cmd_prot

Method cmd_prot

Lib/test/test_ftplib.py:476–486  ·  view source on GitHub ↗

Setup un/secure data channel.

(self, line)

Source from the content-addressed store, hash-verified

474 self.push('200 PBSZ=0 successful.')
475
476 def cmd_prot(self, line):
477 """Setup un/secure data channel."""
478 arg = line.upper()
479 if arg == 'C':
480 self.push('200 Protection set to Clear')
481 self.secure_data_channel = False
482 elif arg == 'P':
483 self.push('200 Protection set to Private')
484 self.secure_data_channel = True
485 else:
486 self.push("502 Unrecognized PROT type (use C or P).")
487
488
489 class DummyTLS_FTPServer(DummyFTPServer):

Callers

nothing calls this directly

Calls 2

upperMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected