Project

General

Profile

« Previous | Next » 

Revision 7116

xml_dom.py: replace_with_text(): Fixed bug where need to use scalar.is_nonnull_scalar() instead of is_scalar() to avoid converting None values to the string 'None'

View differences:

lib/xml_dom.py
59 59
    @return The *new* node
60 60
    '''
61 61
    if isinstance(new, bool): new = bool2str(new)
62
    elif scalar.is_scalar(new): new = strings.ustr(new)
62
    elif scalar.is_nonnull_scalar(new): new = strings.ustr(new)
63 63
    if util.is_str(new): new = node.ownerDocument.createTextNode(new)
64 64
    replace(node, new)
65 65
    return new

Also available in: Unified diff