catch Mutagen exceptions when reading fields (#356)

This commit is contained in:
Adrian Sampson 2012-03-15 08:00:58 -07:00
parent 1b1b8c4ae3
commit d461e7675e

View file

@ -317,7 +317,13 @@ class MediaField(object):
# possibly index the list
if style.list_elem:
if entry: # List must have at least one value.
return entry[0]
# Handle Mutagen bugs when reading values (#356).
try:
return entry[0]
except:
log.error('Mutagen exception when reading field: %s' %
traceback.format_exc)
return None
else:
return None
else: