| 287 | |
| 288 | |
| 289 | class WriteSubprocessPipeProto(protocols.BaseProtocol): |
| 290 | |
| 291 | def __init__(self, proc, fd): |
| 292 | self.proc = proc |
| 293 | self.fd = fd |
| 294 | self.pipe = None |
| 295 | self.disconnected = False |
| 296 | |
| 297 | def connection_made(self, transport): |
| 298 | self.pipe = transport |
| 299 | |
| 300 | def __repr__(self): |
| 301 | return f'<{self.__class__.__name__} fd={self.fd} pipe={self.pipe!r}>' |
| 302 | |
| 303 | def connection_lost(self, exc): |
| 304 | self.disconnected = True |
| 305 | self.proc._pipe_connection_lost(self.fd, exc) |
| 306 | self.proc = None |
| 307 | |
| 308 | def pause_writing(self): |
| 309 | self.proc._protocol.pause_writing() |
| 310 | |
| 311 | def resume_writing(self): |
| 312 | self.proc._protocol.resume_writing() |
| 313 | |
| 314 | |
| 315 | class ReadSubprocessPipeProto(WriteSubprocessPipeProto, |
no outgoing calls
no test coverage detected
searching dependent graphs…