library: log path, reading of which has raised an exception

This commit is contained in:
Mike Kazantsev 2012-10-20 20:07:27 +06:00 committed by fraggod@sacrilege
parent 492f168124
commit 12cae9ee93

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))