From 196880361912fa0d455f7d01ed7bb91f4bfd44d1 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Tue, 14 Sep 2010 15:43:21 +0100 Subject: [PATCH] More cleanups --- openlp/core/ui/maindisplay.py | 2 +- openlp/core/utils/__init__.py | 2 +- openlp/plugins/bibles/lib/opensong.py | 2 +- openlp/plugins/songs/lib/cclifileimport.py | 2 +- openlp/plugins/songs/lib/olp1import.py | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index dcd93dea9..87d1ef50c 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -120,7 +120,7 @@ class MainDisplay(DisplayWidget): self.setScene(self.scene) self.webView = QtWebKit.QGraphicsWebView() self.scene.addItem(self.webView) - self.webView.resize(self.screen[u'size'].width(), \ + self.webView.resize(self.screen[u'size'].width(), self.screen[u'size'].height()) self.page = self.webView.page() self.frame = self.page.mainFrame() diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 462a3ae13..ea14b2259 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -113,7 +113,7 @@ class AppLocation(object): """ if dir_type == AppLocation.AppDir: if hasattr(sys, u'frozen') and sys.frozen == 1: - app_path = os.path.abspath(os.path.split(sys.argv[0])[0]) + app_path = os.path.abspath(os.path.split(sys.argv[0])[0]) else: app_path = os.path.split(openlp.__file__)[0] return app_path diff --git a/openlp/plugins/bibles/lib/opensong.py b/openlp/plugins/bibles/lib/opensong.py index 7acb7e2f2..f1d3efd74 100644 --- a/openlp/plugins/bibles/lib/opensong.py +++ b/openlp/plugins/bibles/lib/opensong.py @@ -89,7 +89,7 @@ class OpenSongBible(BibleDB): Receiver.send_message(u'openlp_process_events') self.wizard.incrementProgressBar( QtCore.QString('%s %s %s' % ( - translate('BiblesPlugin.Opensong', 'Importing'), \ + translate('BiblesPlugin.Opensong', 'Importing'), db_book.name, chapter.attrib[u'n']))) self.session.commit() except IOError: diff --git a/openlp/plugins/songs/lib/cclifileimport.py b/openlp/plugins/songs/lib/cclifileimport.py index 4e5bda8c3..a5db528e9 100755 --- a/openlp/plugins/songs/lib/cclifileimport.py +++ b/openlp/plugins/songs/lib/cclifileimport.py @@ -57,7 +57,7 @@ class CCLIFileImport(SongImport): self.filenames = kwargs[u'filenames'] log.debug(self.filenames) else: - raise KeyError(u'Keyword argument "filenames" not supplied.') + raise KeyError(u'Keyword argument "filenames" not supplied.') def do_import(self): """ diff --git a/openlp/plugins/songs/lib/olp1import.py b/openlp/plugins/songs/lib/olp1import.py index 68bd3ef06..9d1460641 100644 --- a/openlp/plugins/songs/lib/olp1import.py +++ b/openlp/plugins/songs/lib/olp1import.py @@ -31,7 +31,7 @@ import logging import chardet try: import sqlite -except: +except ImportError: pass from openlp.core.lib import translate @@ -93,9 +93,9 @@ class OpenLP1SongImport(SongImport): cursor.execute(u'SELECT authorid, authorname FROM authors') authors = cursor.fetchall() if new_db: - # "cache" our list of tracks - cursor.execute(u'SELECT trackid, fulltrackname FROM tracks') - tracks = cursor.fetchall() + # "cache" our list of tracks + cursor.execute(u'SELECT trackid, fulltrackname FROM tracks') + tracks = cursor.fetchall() # Import the songs cursor.execute(u'SELECT songid, songtitle, lyrics || \'\' AS lyrics, ' u'copyrightinfo FROM songs')