From 971cdfb80ac6a4c0bc09348fd80447f6674d0bf3 Mon Sep 17 00:00:00 2001 From: helmutm Date: Fri, 22 May 2009 09:33:42 +0000 Subject: [PATCH] prepare for future change in XML API git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3391 fd906abe-77d9-0310-91a1-e0d9ade77398 --- xml/element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/element.py b/xml/element.py index 74ba38a..d8640b2 100644 --- a/xml/element.py +++ b/xml/element.py @@ -59,7 +59,7 @@ class Element(object): for c in children: if isinstance(c, Element): base.append(c.baseElement) - elif not base: # no children yet, so it's the first text node + elif len(base) == 0: # no children yet, so it's the first text node base.text = base.text and ' '.join((base.text, c)) or c else: # if there are children, append text to the last child's tail lastChild = base.getchildren()[-1]