Fix OpenSong CUV import

This commit is contained in:
Jon Tibble 2011-01-16 00:47:14 +00:00
parent 1b3de30b92
commit 07c906886e
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class OpenSongBible(BibleDB):
break
self.create_verse(
db_book.id,
int(chapter.attrib[u'n']),
int(chapter.attrib[u'n'].split()[-1]),
int(verse.attrib[u'n']),
unicode(verse.text)
)
@ -87,7 +87,7 @@ class OpenSongBible(BibleDB):
self.wizard.incrementProgressBar(unicode(translate(
'BiblesPlugin.Opensong', 'Importing %s %s...',
'Importing <book name> <chapter>...')) %
(db_book.name, int(chapter.attrib[u'n'])))
(db_book.name, int(chapter.attrib[u'n'].split()[-1])))
self.session.commit()
except (IOError, AttributeError):
log.exception(u'Loading bible from OpenSong file failed')