From 7cdf2bc320f00d670c8db5f5818dd8555e66ca23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20K=C3=B6hler?= Date: Mon, 11 Apr 2011 18:21:54 +0200 Subject: [PATCH] small cleanups --- openlp/plugins/bibles/lib/csvbible.py | 3 ++- openlp/plugins/bibles/lib/db.py | 6 +++--- openlp/plugins/bibles/lib/http.py | 1 - openlp/plugins/bibles/lib/manager.py | 2 -- openlp/plugins/bibles/lib/openlp1.py | 1 - openlp/plugins/bibles/lib/opensong.py | 3 +-- openlp/plugins/bibles/lib/osis.py | 1 - 7 files changed, 6 insertions(+), 11 deletions(-) diff --git a/openlp/plugins/bibles/lib/csvbible.py b/openlp/plugins/bibles/lib/csvbible.py index f0abb9a1d..71af33ca7 100644 --- a/openlp/plugins/bibles/lib/csvbible.py +++ b/openlp/plugins/bibles/lib/csvbible.py @@ -88,7 +88,6 @@ class CSVBible(BibleDB): """ log.info(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) - self.parent = parent #TODO: Delete unused code ''' try: @@ -98,6 +97,8 @@ class CSVBible(BibleDB): ''' self.booksfile = kwargs[u'booksfile'] self.versesfile = kwargs[u'versefile'] + + #TODO: Delete unused code ''' def setup_testaments(self): """ diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 191d18d65..e520aec3f 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -386,10 +386,10 @@ class BibleDB(QtCore.QObject, Manager): return db_book def get_book_ref_id_by_name(self, book, language_id=None): - log.debug(u'BibleManager.get_book_ref_id_by_name:("%s", "%s")', book, + log.debug(u'BibleDB.get_book_ref_id_by_name:("%s", "%s")', book, language_id) - self.alternative_book_names_cache = AlternativeBookNamesDB(self.bible_plugin, - path=self.path) + self.alternative_book_names_cache = AlternativeBookNamesDB( + self.bible_plugin, path=self.path) if BiblesResourcesDB.get_book(book): book_temp = BiblesResourcesDB.get_book(book) book_id = book_temp[u'id'] diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 85f7405a6..bd59d0cc9 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -359,7 +359,6 @@ class HTTPBible(BibleDB): Init confirms the bible exists and stores the database path. """ BibleDB.__init__(self, parent, **kwargs) - self.parent = parent self.download_source = kwargs[u'download_source'] self.download_name = kwargs[u'download_name'] # TODO: Clean up proxy stuff. We probably want one global proxy per diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index e1e32cc80..dd1669b23 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -130,8 +130,6 @@ class BibleManager(object): self.suffix = u'.sqlite' self.import_wizard = None self.reload_bibles() - #TODO: Delete unused code - #self.reload_alternative_book_names() self.media = None def reload_bibles(self): diff --git a/openlp/plugins/bibles/lib/openlp1.py b/openlp/plugins/bibles/lib/openlp1.py index 0de89b4a7..0ef5f95a9 100644 --- a/openlp/plugins/bibles/lib/openlp1.py +++ b/openlp/plugins/bibles/lib/openlp1.py @@ -43,7 +43,6 @@ class OpenLP1Bible(BibleDB): """ log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) - self.parent = parent self.filename = kwargs[u'filename'] def do_import(self): diff --git a/openlp/plugins/bibles/lib/opensong.py b/openlp/plugins/bibles/lib/opensong.py index 37428cc7a..875977bbd 100644 --- a/openlp/plugins/bibles/lib/opensong.py +++ b/openlp/plugins/bibles/lib/opensong.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +song# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 ############################################################################### @@ -43,7 +43,6 @@ class OpenSongBible(BibleDB): """ log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) - self.parent = parent self.filename = kwargs['filename'] def do_import(self): diff --git a/openlp/plugins/bibles/lib/osis.py b/openlp/plugins/bibles/lib/osis.py index ba6cf5d63..9b65bb8d8 100644 --- a/openlp/plugins/bibles/lib/osis.py +++ b/openlp/plugins/bibles/lib/osis.py @@ -46,7 +46,6 @@ class OSISBible(BibleDB): def __init__(self, parent, **kwargs): log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) - self.parent = parent self.filename = kwargs[u'filename'] fbibles = None self.books = {}