Merge pull request #59 from mk-fg/log_read_failure_path

library: log path, reading of which has raised an exception
This commit is contained in:
Adrian Sampson 2012-10-20 16:53:17 -07:00
commit d276a08205

View file

@ -273,7 +273,10 @@ class Item(object):
read_path = self.path
else:
read_path = normpath(read_path)
f = MediaFile(syspath(read_path))
try: f = MediaFile(syspath(read_path))
except Exception as err:
log.error('Failed processing file: {!r}'.format(read_path))
raise
for key in ITEM_KEYS_META:
setattr(self, key, getattr(f, key))