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

Method getline

Lib/ftplib.py:211–223  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

209 # Internal: return one line from the server, stripping CRLF.
210 # Raise EOFError if the connection is closed
211 def getline(self):
212 line = self.file.readline(self.maxline + 1)
213 if len(line) > self.maxline:
214 raise Error("got more than %d bytes" % self.maxline)
215 if self.debugging > 1:
216 print('*get*', self.sanitize(line))
217 if not line:
218 raise EOFError
219 if line[-2:] == CRLF:
220 line = line[:-2]
221 elif line[-1:] in CRLF:
222 line = line[:-1]
223 return line
224
225 # Internal: get a response from the server, which may possibly
226 # consist of multiple lines. Return a single string with no

Callers 11

getmultilineMethod · 0.95
_set_linesMethod · 0.45
formatMethod · 0.45
checklineMethod · 0.45
_formatwarnmsg_implFunction · 0.45
extractFunction · 0.45
localtrace_traceMethod · 0.45
set_breakMethod · 0.45
format_stack_entryMethod · 0.45
user_lineMethod · 0.45

Calls 3

sanitizeMethod · 0.95
ErrorClass · 0.70
readlineMethod · 0.45

Tested by

no test coverage detected