diff --git a/aviary/scripts/singlem_reads.py b/aviary/scripts/singlem_reads.py index 2220bb06..a23913ef 100644 --- a/aviary/scripts/singlem_reads.py +++ b/aviary/scripts/singlem_reads.py @@ -177,8 +177,8 @@ def _check_processes(self, max_processes: int, logf): while len(self.process_queue) > max_processes: for i, (p, f) in enumerate(self.process_queue): if p.poll() is not None: - f.seek(0) - logf.write(f.read()) + for line in f: + logf.write(line) f.close() self.process_queue.pop(i) break