File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -214,10 +214,6 @@ def get_error(error_queue):
214
214
error_thread .daemon = True
215
215
error_thread .start ()
216
216
217
- # mark if output/error is ready
218
- output_ready = False
219
- error_ready = False
220
-
221
217
while (len (wselect ) + len (rselect )) > 0 :
222
218
try :
223
219
if nodejs .stdin in wselect :
@@ -227,29 +223,16 @@ def get_error(error_queue):
227
223
wselect = []
228
224
if nodejs .stdout in rselect :
229
225
if not output_queue .empty ():
230
- output_ready = True
231
226
stdout_buf .write (output_queue .get ())
232
- elif output_ready :
233
- rselect = []
234
- no_more_output .release ()
235
- no_more_error .release ()
236
- output_thread .join ()
237
227
238
228
if nodejs .stderr in rselect :
239
229
if not error_queue .empty ():
240
- error_ready = True
241
230
stderr_buf .write (error_queue .get ())
242
- elif error_ready :
243
- rselect = []
244
- no_more_output .release ()
245
- no_more_error .release ()
246
- output_thread .join ()
247
- error_thread .join ()
231
+
248
232
if stdout_buf .getvalue ().endswith ("\n " .encode ()):
249
233
rselect = []
250
234
no_more_output .release ()
251
235
no_more_error .release ()
252
- output_thread .join ()
253
236
except OSError as e :
254
237
break
255
238
You can’t perform that action at this time.
0 commit comments