diff --git a/openlp/plugins/bibles/lib/csvbible.py b/openlp/plugins/bibles/lib/csvbible.py index 46a65bc51..54775bd35 100644 --- a/openlp/plugins/bibles/lib/csvbible.py +++ b/openlp/plugins/bibles/lib/csvbible.py @@ -27,6 +27,8 @@ import logging import chardet import csv +from PyQt4 import QtCore + from openlp.core.lib import Receiver from db import BibleDB @@ -89,7 +91,7 @@ class CSVBible(BibleDB): verse_file = None try: book_ptr = None - verse_file = open(versesfile, 'r') + verse_file = open(self.versesfile, 'r') dialect = csv.Sniffer().sniff(verse_file.read(1024)) verse_file.seek(0) verse_reader = csv.reader(verse_file, dialect) diff --git a/openlp/plugins/songs/lib/songxml.py b/openlp/plugins/songs/lib/songxml.py index 2dc55ff7d..8789b379d 100644 --- a/openlp/plugins/songs/lib/songxml.py +++ b/openlp/plugins/songs/lib/songxml.py @@ -23,6 +23,7 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # ############################################################################### +import logging import sys import os @@ -32,6 +33,9 @@ sys.path.append(os.path.abspath(u'./../../../..')) from openlp.core.lib import XmlRootClass +log = logging.getLogger(__name__) + + class SongException(Exception): pass @@ -80,7 +84,6 @@ class _OpenSong(XmlRootClass): def _reset(self): """Reset all song attributes""" - global _blankOpenSongXml self._setFromXml(_blankOpenSongXml, 'song') def from_buffer(self, xmlContent): @@ -301,7 +304,7 @@ class Song(object): string = title for char in punctuation: string = string.replace(char, '') - return s + return string def set_title(self, title): """Set the song title @@ -403,7 +406,7 @@ class Song(object): if string_in is None: string_out = "" else: - string_out = unicode(s) + string_out = unicode(string_in) return string_out def _split_to_list(self, aString):