From: Antonio Ospite Date: Mon, 28 Nov 2016 12:42:29 +0000 (+0100) Subject: vidi-player.py: check that the output file exists before creating the pipeline X-Git-Url: https://git.ao2.it/vidi-player.git/commitdiff_plain/fb366373ab57aab0cc28c09ba66e3e72c254c882?ds=inline vidi-player.py: check that the output file exists before creating the pipeline --- 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)