From: Simeon Veldstra Date: Tue, 21 Nov 2006 05:08:45 +0000 (-0800) Subject: Catch GenreException thrown by eyeD3.tag X-Git-Tag: v0.5.9 X-Git-Url: http://puddle.ca/cgi-bin/gitweb.cgi?p=mp3togo;a=commitdiff;h=5b9b6ee6952d0583656ab1bd4371ba1553ee61c1 Catch GenreException thrown by eyeD3.tag --- --- a/mp3togo/tags.py +++ b/mp3togo/tags.py @@ -101,7 +101,10 @@ class Tags(UserDict.DictMixin): self._tags['ARTIST'] = [eye.getArtist() or ''] self._tags['ALBUM'] = [eye.getAlbum() or ''] self._tags['TITLE'] = [eye.getTitle() or ''] - self._tags['GENRE'] = [getattr(eye.getGenre(), 'name', 'Other')] + try: + self._tags['GENRE'] = [getattr(eye.getGenre(), 'name', 'Other')] + except eyeD3.tag.GenreException: + self._tags['GENRE'] = 'Other' del eye elif HAVE_ID3: info = ID3.ID3(self._file, as_tuple=1).as_dict()