Show More
@@ -81,10 +81,11 b' class doublepipe(object):' | |||
|
81 | 81 | def readline(self): |
|
82 | 82 | return self._call('readline') |
|
83 | 83 | |
|
84 |
def _call(self, methname, |
|
|
84 | def _call(self, methname, data=None): | |
|
85 | 85 | """call <methname> on "main", forward output of "side" while blocking |
|
86 | 86 | """ |
|
87 | if size == 0 or self._main.closed: | |
|
87 | # data can be '' or 0 | |
|
88 | if (data is not None and not data) or self._main.closed: | |
|
88 | 89 | _forwardoutput(self._ui, self._side) |
|
89 | 90 | return '' |
|
90 | 91 | while True: |
@@ -93,10 +94,10 b' class doublepipe(object):' | |||
|
93 | 94 | _forwardoutput(self._ui, self._side) |
|
94 | 95 | if mainready: |
|
95 | 96 | meth = getattr(self._main, methname) |
|
96 |
if |
|
|
97 | if data is None: | |
|
97 | 98 | return meth() |
|
98 | 99 | else: |
|
99 |
return meth( |
|
|
100 | return meth(data) | |
|
100 | 101 | |
|
101 | 102 | def close(self): |
|
102 | 103 | return self._main.close() |
General Comments 0
You need to be logged in to leave comments.
Login now