From 07c906886ea914f55b7a3ecabce2be992e915c8c Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Sun, 16 Jan 2011 00:47:14 +0000 Subject: [PATCH] Fix OpenSong CUV import --- openlp/plugins/bibles/lib/opensong.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/bibles/lib/opensong.py b/openlp/plugins/bibles/lib/opensong.py index 2b3b6dfb7..12a6562bc 100644 --- a/openlp/plugins/bibles/lib/opensong.py +++ b/openlp/plugins/bibles/lib/opensong.py @@ -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 ...')) % - (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')