From: Mikael Frykholm Date: Wed, 20 Nov 2013 11:40:28 +0000 (+0100) Subject: Don't crash on missing file X-Git-Url: https://git.frykholm.com/svtplaydump.git/commitdiff_plain/2301fe1403fe109e85b66e4c6f5cbe6da8521b5f Don't crash on missing file More error handling. --- diff --git a/svtplaydump.py b/svtplaydump.py index 8520c7f..54d7ac0 100755 --- a/svtplaydump.py +++ b/svtplaydump.py @@ -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')