Don't crash on missing file
authorMikael Frykholm <mikael@frykholm.com>
Wed, 20 Nov 2013 11:40:28 +0000 (12:40 +0100)
committerMikael Frykholm <mikael@frykholm.com>
Wed, 20 Nov 2013 11:40:28 +0000 (12:40 +0100)
More error handling.

svtplaydump.py

index 8520c7f12997414afe44e7ba21ffe0d58cebc22a..54d7ac0b2c5c3b5496bf924e0eadd2f93872a0cf 100755 (executable)
@@ -227,8 +227,11 @@ def remux(video, xml=None):
         except:
             pass
     if 'timestamp' in video:
-        os.utime(video['path'], times=(video['timestamp'].timestamp(),video['timestamp'].timestamp()))
-
+        try:
+            os.utime(video['path'], times=(video['timestamp'].timestamp(),video['timestamp'].timestamp()))
+        except FileNotFoundError as e:
+            print(e)
+            
     
 def mkv_metadata(video):
     root = BeautifulSoup(features='xml')