Write a line to both file and (optionally) console. Args: line: Line to write (newline will be appended)
(self, line: str)
| 50 | ) |
| 51 | |
| 52 | def write_line(self, line: str) -> None: |
| 53 | """ |
| 54 | Write a line to both file and (optionally) console. |
| 55 | |
| 56 | Args: |
| 57 | line: Line to write (newline will be appended) |
| 58 | """ |
| 59 | with self._lock: |
| 60 | # Write to file |
| 61 | self._file_handle.write(line + "\n") |
| 62 | |
| 63 | # Echo to console if enabled |
| 64 | if self._echo: |
| 65 | print(line) |
| 66 | |
| 67 | def write_footer(self, exit_code: int) -> None: |
| 68 | """ |
no test coverage detected