Project

General

Profile

« Previous | Next » 

Revision 4138

xml_dom.py: replace_with_text(): Support bool `new` values

View differences:

lib/xml_dom.py
44 44
    '''
45 45
    @return The *new* node
46 46
    '''
47
    if isinstance(new, bool): new = util.bool2str(new)
47 48
    if util.is_str(new): new = node.ownerDocument.createTextNode(new)
48 49
    replace(node, new)
49 50
    return new

Also available in: Unified diff