(self)
| 369 | self.reader.start() |
| 370 | |
| 371 | def _read_stdout(self): |
| 372 | assert self.process.stdout is not None |
| 373 | for raw_line in self.process.stdout: |
| 374 | line = raw_line.strip() |
| 375 | if not line: |
| 376 | continue |
| 377 | try: |
| 378 | value = json.loads(line) |
| 379 | except json.JSONDecodeError: |
| 380 | value = None |
| 381 | with self.condition: |
| 382 | if isinstance(value, dict) and "id" in value: |
| 383 | self.responses[value["id"]] = value |
| 384 | else: |
| 385 | self.other_output.append(line) |
| 386 | self.condition.notify_all() |
| 387 | with self.condition: |
| 388 | self.stdout_closed = True |
| 389 | self.condition.notify_all() |
| 390 | |
| 391 | def send(self, value): |
| 392 | check(self.process.stdin is not None, "client stdin is already closed") |
nothing calls this directly
no outgoing calls
no test coverage detected