(self)
| 3040 | return True |
| 3041 | |
| 3042 | def close(self): |
| 3043 | self.log.debug("closing, but flushing first") |
| 3044 | chunk = self.stream_bufferer.flush() |
| 3045 | self.log.debug("got chunk size %d to flush: %r", len(chunk), chunk[:30]) |
| 3046 | try: |
| 3047 | if chunk: |
| 3048 | os.write(self.stream, chunk) |
| 3049 | |
| 3050 | except OSError: |
| 3051 | pass |
| 3052 | |
| 3053 | os.close(self.stream) |
| 3054 | |
| 3055 | |
| 3056 | def determine_how_to_feed_output(handler, encoding, decode_errors): |