From acda697f54c216aa5b10597a3c6c0bf59b6f583f Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sun, 27 Sep 2015 16:38:38 +0800 Subject: [PATCH] [ffmpeg] use subprocess.check_call This fixes RuntimeError: No active exception to reraise --- src/you_get/processor/ffmpeg.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/you_get/processor/ffmpeg.py b/src/you_get/processor/ffmpeg.py index 94378daa..ab262e55 100644 --- a/src/you_get/processor/ffmpeg.py +++ b/src/you_get/processor/ffmpeg.py @@ -109,11 +109,9 @@ def ffmpeg_concat_flv_to_mp4(files, output='output.mp4'): params.append(output + '.txt') params += ['-c', 'copy', output] - if subprocess.call(params) == 0: - os.remove(output + '.txt') - return True - else: - raise + subprocess.check_call(params) + os.remove(output + '.txt') + return True for file in files: if os.path.isfile(file):