vidi-player.py: check that the output file exists before creating the pipeline
authorAntonio Ospite <ao2@ao2.it>
Mon, 28 Nov 2016 12:42:29 +0000 (13:42 +0100)
committerAntonio Ospite <ao2@ao2.it>
Mon, 28 Nov 2016 12:42:29 +0000 (13:42 +0100)
vidi-player.py

index 9b6d144..303d55d 100755 (executable)
@@ -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)