(self, txt)
| 53 | self.start_line = True |
| 54 | |
| 55 | def write(self, txt): |
| 56 | if self.start_line: |
| 57 | time_str = time.strftime('%Y-%m-%d-%H-%M') |
| 58 | self.log.write('{}: {}'.format(time_str, txt)) |
| 59 | else: |
| 60 | self.log.write(txt) |
| 61 | self.start_line = False |
| 62 | if '\n' in txt: |
| 63 | self.start_line = True |
| 64 | self.log.flush() |
| 65 | |
| 66 | def close(self): |
| 67 | self.log.close() |
no outgoing calls
no test coverage detected