(self, lines)
| 149 | return s |
| 150 | |
| 151 | def _write_lines(self, lines): |
| 152 | # We have to transform the line endings. |
| 153 | if not lines: |
| 154 | return |
| 155 | lines = NLCRE.split(lines) |
| 156 | for line in lines[:-1]: |
| 157 | self.write(line) |
| 158 | self.write(self._NL) |
| 159 | if lines[-1]: |
| 160 | self.write(lines[-1]) |
| 161 | # XXX logic tells me this else should be needed, but the tests fail |
| 162 | # with it and pass without it. (NLCRE.split ends with a blank element |
| 163 | # if and only if there was a trailing newline.) |
| 164 | #else: |
| 165 | # self.write(self._NL) |
| 166 | |
| 167 | def _write(self, msg): |
| 168 | # We can't write the headers yet because of the following scenario: |
no test coverage detected