]> 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 13:58:21 +0000 (14:58 +0100)
Insert use measure number 0 if not a number.

scripts/musicxml2ly.py

index 6c2691c30c62e573de719007b51e8deee41ee715..ab5989dd6f8447d1c61f19e3222dd9fc34dfb128 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