File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -135,10 +135,10 @@ def readline_stderr(self, timeout=None):
135
135
return self .readline_channel (STDERR_CHANNEL , timeout = timeout )
136
136
137
137
def read_all (self ):
138
- """Read all of the inputs with the same order they recieved. The channel
139
- information would be part of the string. This is useful for
140
- non-interactive call where a set of command passed to the API call and
141
- their result is needed after the call is concluded.
138
+ """Return buffered data received on stdout and stderr channels.
139
+ This is useful for non-interactive call where a set of command passed
140
+ to the API call and their result is needed after the call is concluded.
141
+ Should be called after run_forever() or update()
142
142
143
143
TODO: Maybe we can process this and return a more meaningful map with
144
144
channels mapped for each input.
@@ -178,9 +178,10 @@ def update(self, timeout=0):
178
178
channel = ord (data [0 ])
179
179
data = data [1 :]
180
180
if data :
181
- # keeping all messages in the order they received for
182
- # non-blocking call.
183
- self ._all += data
181
+ if channel in [STDOUT_CHANNEL , STDERR_CHANNEL ]:
182
+ # keeping all messages in the order they received for
183
+ # non-blocking call.
184
+ self ._all += data
184
185
if channel not in self ._channels :
185
186
self ._channels [channel ] = data
186
187
else :
You can’t perform that action at this time.
0 commit comments