]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/musicxml.py
Fundamental, finished
[lilypond.git] / python / musicxml.py
index 7c398e1e5d7a5f73a97b3a25d22bcbf37122f289..e0612802b79beb84532a7de77dc730893d972223 100644 (file)
@@ -379,7 +379,7 @@ class Part_list (Music_xml_node):
         if instrument_name:
             return instrument_name
         else:
-            ly.stderr_write (_ ("Unable to find find instrument for ID=%s\n") % id)
+            ly.stderr_write (_ ("Unable to find instrument for ID=%s\n") % id)
             return "Grand Piano"
 
 class Part_group (Music_xml_node):
@@ -953,9 +953,8 @@ def get_class (name):
 def lxml_demarshal_node (node):
     name = node.tag
 
-    # TODO: This is a nasty hack, but I couldn't find any other way to check
-    #       if the given node is a comment node (class _Comment):
-    if name is None or re.match (u"^<!--.*-->$", node.__repr__()):
+    # Ignore comment nodes, which are also returned by the etree parser!
+    if name is None or node.__class__.__name__ == "_Comment":
         return None
     klass = get_class (name)
     py_node = klass()