From 63ead49bcb0bdf428b6b663d90892e6a4501d52a Mon Sep 17 00:00:00 2001 From: Aaron Barnes Date: Sun, 14 Feb 2016 21:27:06 +1300 Subject: [PATCH] gh-84 Do not attempt to process an invalid file --- elodie/filesystem.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elodie/filesystem.py b/elodie/filesystem.py index 0dcec4f..50d5b5c 100644 --- a/elodie/filesystem.py +++ b/elodie/filesystem.py @@ -175,6 +175,10 @@ class FileSystem(object): if('allowDuplicate' in kwargs): allow_duplicate = kwargs['allowDuplicate'] + if(not media.is_valid()): + print '%s is not a valid media file. Skipping...' % _file + return + metadata = media.get_metadata() directory_name = self.get_folder_path(metadata)