Project

General

Profile

« Previous | Next » 

Revision 4235

xml_dom.py: replace_with_text(): Use new bool2str() so that False causes the node to be removed instead of replaced with the empty string

View differences:

lib/xml_dom.py
49 49
    '''
50 50
    @return The *new* node
51 51
    '''
52
    if isinstance(new, bool): new = util.bool2str(new)
52
    if isinstance(new, bool): new = bool2str(new)
53 53
    if util.is_str(new): new = node.ownerDocument.createTextNode(new)
54 54
    replace(node, new)
55 55
    return new

Also available in: Unified diff