An attribute is referenced on an object returned from the eyeD3 module that
may in some cases be None. In this case an AttributeError exception is
raised. Changed the reference to a getattr call with a default value.
--- a/mp3togo/__init__.py
+++ b/mp3togo/__init__.py
@@ -21,5 +21,5 @@
# __all__ = ('converter', 'main', 'options', 'setup')
-version = '0.5.6'
+version = '0.5.7'
--- a/mp3togo/tags.py
+++ b/mp3togo/tags.py
@@ -101,7 +101,7 @@ 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'] = [eye.getGenre().name or 'Other']
+ self._tags['GENRE'] = [getattr(eye.getGenre(), 'name', 'Other')]
del eye
elif HAVE_ID3:
info = ID3.ID3(self._file, as_tuple=1).as_dict()