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

Method found_terminator

Lib/test/test_ftplib.py:129–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 self.in_buffer.append(data)
128
129 def found_terminator(self):
130 line = b''.join(self.in_buffer).decode(self.encoding)
131 self.in_buffer = []
132 if self.next_response:
133 self.push(self.next_response)
134 self.next_response = ''
135 cmd = line.split(' ')[0].lower()
136 self.last_received_cmd = cmd
137 space = line.find(' ')
138 if space != -1:
139 arg = line[space + 1:]
140 else:
141 arg = ""
142 if hasattr(self, 'cmd_' + cmd):
143 method = getattr(self, 'cmd_' + cmd)
144 method(arg)
145 else:
146 self.push('550 command "%s" not understood.' %cmd)
147
148 def handle_error(self):
149 default_error_handler()

Callers

nothing calls this directly

Calls 7

pushMethod · 0.95
methodFunction · 0.85
decodeMethod · 0.45
joinMethod · 0.45
lowerMethod · 0.45
splitMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected