From: pin Date: Tue, 6 Jul 2010 12:00:31 +0000 (+0000) Subject: Ajout try/except pour ne pas planter quand une parole est manquante. X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/commitdiff_plain/145a1e9a14954feaf5e3f6806e33c5cd49439bc9 Ajout try/except pour ne pas planter quand une parole est manquante. git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@262 fe552daf-6dbe-4428-90eb-1537e0879342 --- diff --git a/src/minwii/widgets/playingscreen.py b/src/minwii/widgets/playingscreen.py index 0591929..0e179dd 100755 --- a/src/minwii/widgets/playingscreen.py +++ b/src/minwii/widgets/playingscreen.py @@ -293,7 +293,10 @@ class SongPlayingScreen(PlayingScreenBase) : if self.currentColumn: self.currentColumn.update(False) note, verseIndex = self.noteIterator.next() - syllabus = note.lyrics[verseIndex].syllabus() + try : + syllabus = note.lyrics[verseIndex].syllabus() + except IndexError : + syllabus = u'…' column = self.columns[note.midi] column.update(True, syllabus) self.currentColumn = column