Function
stream_reader
(pipe, collector: "list[str]", log_file)
Source from the content-addressed store, hash-verified
| 483 | return datetime.now().strftime("%Y-%m-%d %H:%M:%S,%f")[:-3] # same format as logging |
| 484 | |
| 485 | def stream_reader(pipe, collector: "list[str]", log_file) -> None: |
| 486 | for line in iter(pipe.readline, ""): |
| 487 | log_file.write(f"{timestamp()} {line}") |
| 488 | log_file.flush() |
| 489 | collector.append(line) |
| 490 | pipe.close() |
| 491 | |
| 492 | logger.debug(f"running command `{' '.join(cmds)}` in directory '{cwd}'") |
| 493 | stdout: list[str] = [] |
Callers
nothing calls this directly
Tested by
no test coverage detected