[PipeOutput] Combine all return codes from pipeline.

This allows the caller to detect whether intermediate commands (eg.
ffmpeg | ffplay) failed.
pull/357/head
nyanpasu64 2018-08-18 00:04:01 -07:00
rodzic 2c48de88af
commit 8f228d2da7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -108,9 +108,9 @@ class PipeOutput(Output):
def close(self) -> int:
self._stream.close()
retval = None
retval = 0
for popen in self._pipeline:
retval = popen.wait()
retval |= popen.wait()
return retval # final value
def __exit__(self, exc_type, exc_val, exc_tb):