(self)
| 65 | self.in_buffer.append(data) |
| 66 | |
| 67 | def found_terminator(self): |
| 68 | line = b''.join(self.in_buffer) |
| 69 | line = str(line, 'ISO-8859-1') |
| 70 | self.in_buffer = [] |
| 71 | cmd = line.split(' ')[0].lower() |
| 72 | space = line.find(' ') |
| 73 | if space != -1: |
| 74 | arg = line[space + 1:] |
| 75 | else: |
| 76 | arg = "" |
| 77 | if hasattr(self, 'cmd_' + cmd): |
| 78 | method = getattr(self, 'cmd_' + cmd) |
| 79 | method(arg) |
| 80 | else: |
| 81 | self.push('-ERR unrecognized POP3 command "%s".' %cmd) |
| 82 | |
| 83 | def handle_error(self): |
| 84 | raise |