From 91c20c42713b8dcbf28efecfb0bf628241042b99 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 3 Oct 2011 22:26:51 +0200 Subject: [PATCH] more clean ups --- openlp/plugins/bibles/lib/http.py | 9 ++++++--- openlp/plugins/songs/lib/cclifileimport.py | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 2d8e16c4c..228d4758c 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -82,13 +82,16 @@ class BGExtract(object): Receiver.send_message(u'openlp_process_events') footnotes = soup.findAll(u'sup', u'footnote') if footnotes: - [footnote.extract() for footnote in footnotes] + for footnote in footnotes: + footnote.extract() crossrefs = soup.findAll(u'sup', u'xref') if crossrefs: - [crossref.extract() for crossref in crossrefs] + for crossref in crossrefs: + crossref.extract() headings = soup.findAll(u'h5') if headings: - [heading.extract() for heading in headings] + for heading in headings: + heading.extract() cleanup = [(re.compile('\s+'), lambda match: ' ')] verses = BeautifulSoup(str(soup), markupMassage=cleanup) verse_list = {} diff --git a/openlp/plugins/songs/lib/cclifileimport.py b/openlp/plugins/songs/lib/cclifileimport.py index e15f898ab..624256290 100644 --- a/openlp/plugins/songs/lib/cclifileimport.py +++ b/openlp/plugins/songs/lib/cclifileimport.py @@ -333,5 +333,6 @@ class CCLIFileImport(SongImport): if len(author_list) < 2: author_list = song_author.split(u'|') # Clean spaces before and after author names. - [self.addAuthor(author_name.strip()) for author_name in author_list] + for author_name in author_list: + self.addAuthor(author_name.strip()) return self.finish()