Skip to content

Commit

Permalink
mediafile: Catch IndexError when file has empty list tag
Browse files Browse the repository at this point in the history
Fixes #913
  • Loading branch information
Thomas Scholtes committed Aug 24, 2014
1 parent 225ce62 commit 32626fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beets/mediafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def fetch(self, mutagen_file):
"""
try:
return mutagen_file[self.key][0]
except KeyError:
except (KeyError, IndexError):
return None

def deserialize(self, mutagen_value):
Expand Down Expand Up @@ -665,7 +665,7 @@ def __init__(self, key, id3_lang=None, **kwargs):
def fetch(self, mutagen_file):
try:
return mutagen_file[self.key].text[0]
except KeyError:
except (KeyError, IndexError):
return None

def store(self, mutagen_file, value):
Expand Down

0 comments on commit 32626fe

Please sign in to comment.