From 69f3a7655c4a81a55a0b0814c24f56f83ac20d31 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Wed, 28 Jul 2021 10:57:15 +0300 Subject: [PATCH] [~] Refactor --- python/tasks/mlb_player.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/tasks/mlb_player.py b/python/tasks/mlb_player.py index a6c08f1..3213dfe 100644 --- a/python/tasks/mlb_player.py +++ b/python/tasks/mlb_player.py @@ -1683,6 +1683,8 @@ def kernel_27(): t2 = os.path.join(t3, 'slice-%d' % i) os.makedirs(t2, exist_ok=True) t4 = os.path.join(t2, 'output.mp4') + if os.path.exists(t4): + os.unlink(t4) with subprocess.Popen([ 'ffmpeg', '-i',