()
| 835 | writer = codecs.open(self.fname, 'w', encoding='ascii', |
| 836 | errors='xmlcharrefreplace', buffering=0) |
| 837 | def cleanup(): |
| 838 | writer.close() |
| 839 | os_helper.unlink(self.fname) |
| 840 | self.addCleanup(cleanup) |
| 841 | def getvalue(): |
| 842 | # Windows will not let use reopen without first closing |