From 974a90a173f97454795f8b9176a0d4b8d4624f1c Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 18 Apr 2011 21:24:06 +0200 Subject: [PATCH] no xml raises XMLSyntaxError, that is why this is not needed --- openlp/plugins/songs/lib/foilpresenterimport.py | 7 ++----- openlp/plugins/songs/lib/openlyricsimport.py | 4 +--- openlp/plugins/songs/lib/ui.py | 1 - 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/openlp/plugins/songs/lib/foilpresenterimport.py b/openlp/plugins/songs/lib/foilpresenterimport.py index 6f4164d17..0c7152bfd 100644 --- a/openlp/plugins/songs/lib/foilpresenterimport.py +++ b/openlp/plugins/songs/lib/foilpresenterimport.py @@ -128,9 +128,7 @@ class FoilPresenterImport(SongImport): try: parsed_file = etree.parse(file_path, parser) xml = unicode(etree.tostring(parsed_file)) - if self.FoilPresenter.xml_to_song(xml) is None: - self.log_error(file_path, SongStrings.NoXML) - log.debug(u'File could not be imported: %s' % file_path) + self.FoilPresenter.xml_to_song(xml) except etree.XMLSyntaxError: self.log_error(file_path, SongStrings.XMLSyntaxError) log.exception(u'XML syntax error in file %s' % file_path) @@ -213,7 +211,7 @@ class FoilPresenter(object): """ # No xml get out of here. if not xml: - return None + return if xml[:5] == u'