forked from openlp/openlp
Fix #304, catch AttributeError together with XML syntax error (which is true in wider meaning of syntax, I think).
This commit is contained in:
parent
c10f73144d
commit
95147c996b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user