(self)
| 1320 | |
| 1321 | |
| 1322 | def _get_line(self): |
| 1323 | |
| 1324 | line = self.readline() |
| 1325 | if not line: |
| 1326 | raise self.abort('socket error: EOF') |
| 1327 | |
| 1328 | # Protocol mandates all lines terminated by CRLF |
| 1329 | if not line.endswith(b'\r\n'): |
| 1330 | raise self.abort('socket error: unterminated line: %r' % line) |
| 1331 | |
| 1332 | line = line[:-2] |
| 1333 | if __debug__: |
| 1334 | if self.debug >= 4: |
| 1335 | self._mesg('< %r' % line) |
| 1336 | else: |
| 1337 | self._log('< %r' % line) |
| 1338 | return line |
| 1339 | |
| 1340 | |
| 1341 | def _match(self, cre, s): |