]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond
authorReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 5 Mar 2008 16:02:55 +0000 (17:02 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 5 Mar 2008 16:02:55 +0000 (17:02 +0100)
python/musicxml.py

index 7c398e1e5d7a5f73a97b3a25d22bcbf37122f289..0e63c5ecdb12e026ab6b03f02d0efd291d4820e2 100644 (file)
@@ -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()