Project

General

Profile

« Previous | Next » 

Revision 448

xml_func.py: Changed formatting of comment that node with syntax errors is replaced with so that it starts on its own line

View differences:

xml_func.py
95 95
    if name.startswith('_') and name in funcs:
96 96
        try: value = funcs[name](xml_dom.NodeTextEntryIter(node))
97 97
        except SyntaxException, e:
98
            node_str = str(node)
99
            exc.add_msg(e, 'function:\n'+node_str)
100
            xml_dom.replace(node, node.ownerDocument.createComment(node_str))
98
            str_ = str(node)
99
            exc.add_msg(e, 'function:\n'+str_)
100
            xml_dom.replace(node, node.ownerDocument.createComment('\n'+str_))
101 101
            on_error(e)
102 102
        else: xml_dom.replace_with_text(node, value)
103 103
    else:

Also available in: Unified diff