From fb366373ab57aab0cc28c09ba66e3e72c254c882 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 28 Nov 2016 13:42:29 +0100 Subject: [PATCH] vidi-player.py: check that the output file exists before creating the pipeline --- vidi-player.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vidi-player.py b/vidi-player.py index 9b6d144..303d55d 100755 --- a/vidi-player.py +++ b/vidi-player.py @@ -98,6 +98,10 @@ def main(): usage() return 1 + if len(sys.argv) > 3 and os.path.exists(sys.argv[3]): + sys.stderr.write("File '%s' exists, exiting!\n" % sys.argv[3]) + return 1 + video_font_path = os.path.realpath(sys.argv[2]) timeline = timeline_from_midi(midi_file, video_font_path) -- 2.1.4