Fix song imports with missing Authors

bzr-revno: 1141
This commit is contained in:
Tim Bentley 2010-12-11 13:29:47 +00:00
commit 1666ca372d

View File

@ -346,8 +346,12 @@ class OpenLyricsParser(object):
song.comments = u''
song.song_number = u''
# Process Authors
for author in properties.authors.author:
self._process_author(author.text, song)
try:
for author in properties.authors.author:
self._process_author(author.text, song)
except:
# No Author in XML so ignore
pass
self.manager.save_object(song)
return song.id