Fix typos

This commit is contained in:
Tim Bentley 2009-10-27 20:52:30 +00:00
parent 0e5ed927c1
commit db392aa086
4 changed files with 12 additions and 16 deletions

View File

@ -68,13 +68,15 @@ class BGExtract(BibleCommon):
verseText = u'' verseText = u''
versePos = xml_string.find(u'</sup>', versePos) + 6 versePos = xml_string.find(u'</sup>', versePos) + 6
i = xml_string.find(verseSearch, versePos + 1) i = xml_string.find(verseSearch, versePos + 1)
# Not sure if this is needed now
if i == -1: if i == -1:
i = xml_string.find(u'</div', versePos + 1) i = xml_string.find(u'</div', versePos + 1)
j = xml_string.find(u'<strong', versePos + 1) j = xml_string.find(u'<strong', versePos + 1)
if j > 0 and j < i: if j > 0 and j < i:
i = j i = j
verseText = xml_string[versePos + 7 : i ] verseText = xml_string[versePos + 7 : i ]
bible[verse] = self._clean_text(verseText) # store the verse # store the verse
bible[verse] = self._clean_text(verseText)
versePos = -1 versePos = -1
else: else:
verseText = xml_string[versePos: i] verseText = xml_string[versePos: i]
@ -85,8 +87,10 @@ class BGExtract(BibleCommon):
start_tag = verseText.find(verseFootnote) start_tag = verseText.find(verseFootnote)
# Chop off verse and start again # Chop off verse and start again
xml_string = xml_string[i:] xml_string = xml_string[i:]
versePos = xml_string.find(verseSearch) #look for the next verse #look for the next verse
bible[verse] = self._clean_text(verseText) # store the verse versePos = xml_string.find(verseSearch)
# store the verse
bible[verse] = self._clean_text(verseText)
verse += 1 verse += 1
return SearchResults(bookname, chapter, bible) return SearchResults(bookname, chapter, bible)

View File

@ -66,15 +66,7 @@ class BibleManager(object):
self.bibleSuffix = u'sqlite' self.bibleSuffix = u'sqlite'
self.dialogobject = None self.dialogobject = None
self.reload_bibles() self.reload_bibles()
self.media = None
def set_media_manager(self, media):
"""
Sets the reference to the media manager.
``media``
The reference to the media manager.
"""
self.media = media
def reload_bibles(self): def reload_bibles(self):
log.debug(u'Reload bibles') log.debug(u'Reload bibles')

View File

@ -268,7 +268,7 @@ class BibleMediaItem(MediaManagerItem):
def initialise(self): def initialise(self):
log.debug(u'bible manager initialise') log.debug(u'bible manager initialise')
self.loadBibles() self.loadBibles()
self.parent.biblemanager.set_media_manager(self) self.parent.biblemanager.media = self
self.configUpdated() self.configUpdated()
log.debug(u'bible manager initialise complete') log.debug(u'bible manager initialise complete')

View File

@ -101,7 +101,7 @@ class SongUsageManager():
return True return True
except: except:
self.session.rollback() self.session.rollback()
log.excertion(u'SongUsage Item failed to delete') log.exception(u'SongUsage Item failed to delete')
return False return False
else: else:
return True return True
@ -116,7 +116,7 @@ class SongUsageManager():
return True return True
except: except:
self.session.rollback() self.session.rollback()
log.excertion(u'Failed to delete all Song Usage items') log.exception(u'Failed to delete all Song Usage items')
return False return False
def delete_to_date(self, date): def delete_to_date(self, date):
@ -130,5 +130,5 @@ class SongUsageManager():
return True return True
except: except:
self.session.rollback() self.session.rollback()
log.excertion(u'Failed to delete all Song Usage items to %s' % date) log.exception(u'Failed to delete all Song Usage items to %s' % date)
return False return False