Fix #304, catch AttributeError together with XML syntax error (which is true in wider meaning of syntax, I think).

This commit is contained in:
Mattias Põldaru 2011-12-15 05:45:30 +02:00
parent c10f73144d
commit 95147c996b

View File

@ -70,6 +70,6 @@ class OpenLyricsImport(SongImport):
parsed_file = etree.parse(open(file_path, u'r'), parser)
xml = unicode(etree.tostring(parsed_file))
self.openLyrics.xml_to_song(xml)
except etree.XMLSyntaxError:
except etree.XMLSyntaxError, AttributeError:
log.exception(u'XML syntax error in file %s' % file_path)
self.logError(file_path, SongStrings.XMLSyntaxError)