From 95147c996bbe478c39b72fe72c4c4ecaaed3f61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20P=C3=B5ldaru?= Date: Thu, 15 Dec 2011 05:45:30 +0200 Subject: [PATCH] Fix #304, catch AttributeError together with XML syntax error (which is true in wider meaning of syntax, I think). --- openlp/plugins/songs/lib/openlyricsimport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/openlyricsimport.py b/openlp/plugins/songs/lib/openlyricsimport.py index f3639fc3b..42d075c51 100644 --- a/openlp/plugins/songs/lib/openlyricsimport.py +++ b/openlp/plugins/songs/lib/openlyricsimport.py @@ -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)