From: Reinhold Kainhofer Date: Wed, 5 Mar 2008 16:02:55 +0000 (+0100) Subject: Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond X-Git-Tag: release/2.11.42-1~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=334e0c7b7466162cfd1763f3166c6070b9bf4caa;hp=ed512ea155eb2414469edaadd288139b84e8bbfc;p=lilypond.git Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond --- diff --git a/python/musicxml.py b/python/musicxml.py index 7c398e1e5d..0e63c5ecdb 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -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()