forked from openlp/openlp
Fix undefined variables
This commit is contained in:
parent
c7d420d4b9
commit
29cfcee29f
@ -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)
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user