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

Method putline

Lib/ftplib.py:195–202  ·  view source on GitHub ↗
(self, line)

Source from the content-addressed store, hash-verified

193
194 # Internal: send one line to the server, appending CRLF
195 def putline(self, line):
196 if '\r' in line or '\n' in line:
197 raise ValueError('an illegal newline character should not be contained')
198 sys.audit("ftplib.sendcmd", self, line)
199 line = line + CRLF
200 if self.debugging > 1:
201 print('*put*', self.sanitize(line))
202 self.sock.sendall(line.encode(self.encoding))
203
204 # Internal: send one command to the server (through putline())
205 def putcmd(self, line):

Callers 1

putcmdMethod · 0.95

Calls 3

sanitizeMethod · 0.95
sendallMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected