← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~phill-ridout/openlp/bug-1011286 into lp:openlp

 

phill has proposed merging lp:~phill-ridout/openlp/bug-1011286 into lp:openlp.

Requested reviews:
  Tim Bentley (trb143)
Related bugs:
  Bug #1011286 in OpenLP: "Song Editor -> Edit All Crashes with out valid verse splitter"
  https://bugs.launchpad.net/openlp/+bug/1011286

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug-1011286/+merge/109568

Removed debug.log statment
-- 
https://code.launchpad.net/~phill-ridout/openlp/bug-1011286/+merge/109568
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py	2012-04-29 15:31:56 +0000
+++ openlp/plugins/songs/forms/editverseform.py	2012-06-11 06:14:23 +0000
@@ -189,8 +189,13 @@
         if self.hasSingleVerse:
             value = unicode(self.getVerse()[0])
         else:
-            log.debug(unicode(self.getVerse()[0]).split(u'\n'))
-            value = unicode(self.getVerse()[0]).split(u'\n')[1]
+            lines = unicode(self.getVerse()[0]).split(u'\n')
+            if len(lines) <= 1:
+                critical_error_message_box(
+                    message=translate('SongsPlugin.EditSongForm',
+                    'Invalid entry, you need a verse splitter and some text.'))
+                return False
+            value = lines[1]
             if not value:
                 lines = unicode(self.getVerse()[0]).split(u'\n')
                 index = 2


Follow ups