]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #222.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 6 Jan 2007 13:58:21 +0000 (14:58 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 6 Jan 2007 20:48:25 +0000 (21:48 +0100)
Insert use measure number 0 if not a number.

scripts/musicxml2ly.py

index 4240b3aaaee0e77faa8ce0665ccd2794859df921..77fffc25fe745f662381d64f3738ca6c207db908 100644 (file)
@@ -313,7 +313,12 @@ def musicxml_voice_to_lily_voice (voice):
             
         if isinstance (n, musicxml.Attributes):
             if n.is_first () and n._measure_position == Rational (0):
-                voice_builder.add_bar_check (int (n.get_parent ().number))
+                try:
+                    number = int (n.get_parent ().number)
+                except ValueError:
+                    number = 0
+                
+                voice_builder.add_bar_check (number)
             for a in musicxml_attributes_to_lily (n):
                 voice_builder.add_music (a, Rational (0))
             continue