From 145a1e9a14954feaf5e3f6806e33c5cd49439bc9 Mon Sep 17 00:00:00 2001 From: pin Date: Tue, 6 Jul 2010 12:00:31 +0000 Subject: [PATCH 1/1] 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 --- src/minwii/widgets/playingscreen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.20.1