diff --git a/aeneas/ffmpegwrapper.py b/aeneas/ffmpegwrapper.py index a4f81cb..fd5f274 100644 --- a/aeneas/ffmpegwrapper.py +++ b/aeneas/ffmpegwrapper.py @@ -219,9 +219,8 @@ def convert( try: proc = subprocess.run( arguments, - stdout=subprocess.PIPE, + capture_output=True, stdin=subprocess.PIPE, - stderr=subprocess.PIPE, check=True, ) except OSError as exc: @@ -233,7 +232,12 @@ def convert( FFMPEGPathError, ) except subprocess.CalledProcessError as e: - self.log_exc("ffmpeg returned non-zero status %r: %s" % (e.returncode, e.stderr.decode("utf-8", "replace")), critical=True, raise_type=OSError) + self.log_exc( + "ffmpeg returned non-zero status %r: %s" + % (e.returncode, e.stderr.decode("utf-8", "replace")), + critical=True, + raise_type=OSError, + ) self.log("Call completed") diff --git a/aeneas/tests/test_vad.py b/aeneas/tests/test_vad.py index b69eff9..381f6bb 100644 --- a/aeneas/tests/test_vad.py +++ b/aeneas/tests/test_vad.py @@ -77,7 +77,11 @@ def perform(self, input_file_path, speech_length, nonspeech_length): def test_compute_vad(self): for f in self.FILES: - with self.subTest(path=f["path"], speech_length=f["speech_length"], nonspeech_length=f["nonspeech_length"]): + with self.subTest( + path=f["path"], + speech_length=f["speech_length"], + nonspeech_length=f["nonspeech_length"], + ): self.perform(f["path"], f["speech_length"], f["nonspeech_length"]) def test_not_existing(self):