From 175fe7a4e1aa612eba54a079f1cbd874dd675496 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 20 Sep 2017 15:10:06 +0530 Subject: [PATCH] fakessh: IoPump() doesn't need Process reference. --- mitogen/fakessh.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mitogen/fakessh.py b/mitogen/fakessh.py index 66bad698..4cc95e54 100644 --- a/mitogen/fakessh.py +++ b/mitogen/fakessh.py @@ -80,8 +80,7 @@ class IoPump(mitogen.core.BasicStream): _output_buf = '' _closed = False - def __init__(self, process, broker, stdin_fd, stdout_fd): - self.process = process + def __init__(self, broker, stdin_fd, stdout_fd): self._broker = broker self.receive_side = mitogen.core.Side(self, stdout_fd) self.transmit_side = mitogen.core.Side(self, stdin_fd) @@ -122,8 +121,9 @@ class IoPump(mitogen.core.BasicStream): self.on_disconnect(broker) def __repr__(self): - return 'IoPump(%r)' % ( - self.process, + return 'IoPump(%r, %r)' % ( + self.receive_side.fd, + self.transmit_side.fd, ) @@ -139,7 +139,7 @@ class Process(object): self.proc = proc self.control_handle = router.add_handler(self._on_control) self.stdin_handle = router.add_handler(self._on_stdin) - self.pump = IoPump(self, router.broker, stdin_fd, stdout_fd) + self.pump = IoPump(router.broker, stdin_fd, stdout_fd) self.stdin = None self.control = None self.wake_event = threading.Event()