(self)
| 227 | # trailing CRLF. If the response consists of multiple lines, |
| 228 | # these are separated by '\n' characters in the string |
| 229 | def getmultiline(self): |
| 230 | line = self.getline() |
| 231 | if line[3:4] == '-': |
| 232 | code = line[:3] |
| 233 | while 1: |
| 234 | nextline = self.getline() |
| 235 | line = line + ('\n' + nextline) |
| 236 | if nextline[:3] == code and \ |
| 237 | nextline[3:4] != '-': |
| 238 | break |
| 239 | return line |
| 240 | |
| 241 | # Internal: get a response from the server. |
| 242 | # Raise various errors if the response indicates an error |