openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #06673
[Merge] lp:~mahfiaz/openlp/songsplugin-fixes into lp:openlp
mahfiaz has proposed merging lp:~mahfiaz/openlp/songsplugin-fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~mahfiaz/openlp/songsplugin-fixes/+merge/52127
Addresses: https://bugs.launchpad.net/openlp/+bug/728637 an exception on empty verse number, it defaults to 1 now.
--
https://code.launchpad.net/~mahfiaz/openlp/songsplugin-fixes/+merge/52127
Your team OpenLP Core is requested to review the proposed merge of lp:~mahfiaz/openlp/songsplugin-fixes into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py 2011-02-24 05:47:38 +0000
+++ openlp/plugins/songs/forms/editverseform.py 2011-03-03 20:51:52 +0000
@@ -98,7 +98,10 @@
match = self.verse_regex.match(text)
if match:
verse_tag = match.group(1)
- verse_num = int(match.group(2))
+ try:
+ verse_num = int(match.group(2))
+ except ValueError:
+ verse_num = 1
verse_type_index = VerseType.from_loose_input(verse_tag)
if verse_type_index is not None:
self.verseNumberBox.setValue(verse_num)
@@ -127,7 +130,10 @@
if match:
verse_type = match.group(1)
verse_type_index = VerseType.from_loose_input(verse_type)
- verse_number = int(match.group(2))
+ try:
+ verse_number = int(match.group(2))
+ except ValueError:
+ verse_number = 1
if verse_type_index is not None:
self.verseTypeComboBox.setCurrentIndex(verse_type_index)
self.verseNumberBox.setValue(verse_number)
Follow ups