Handle KeyboardInterrupt in the main program, not in the Player class
[vidi-player.git] / vidi-player.py
index 04c8941..62ae575 100755 (executable)
@@ -105,7 +105,11 @@ def main():
     if len(sys.argv) > 3:
         timeline.save(sys.argv[3])
     else:
-        timeline.play()
+        try:
+            timeline.play()
+        except KeyboardInterrupt:
+            timeline.stop()
+            return 1
 
 
 if __name__ == "__main__":