[Erp5-report] r30050 - /erp5/trunk/utils/erp5diff/ERP5Diff.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 27 18:45:07 CET 2009
Author: nicolas
Date: Tue Oct 27 18:45:04 2009
New Revision: 30050
URL: http://svn.erp5.org?rev=30050&view=rev
Log:
improve text gathering
Modified:
erp5/trunk/utils/erp5diff/ERP5Diff.py
Modified: erp5/trunk/utils/erp5diff/ERP5Diff.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5diff/ERP5Diff.py?rev=30050&r1=30049&r2=30050&view=diff
==============================================================================
--- erp5/trunk/utils/erp5diff/ERP5Diff.py [utf8] (original)
+++ erp5/trunk/utils/erp5diff/ERP5Diff.py [utf8] Tue Oct 27 18:45:04 2009
@@ -348,13 +348,7 @@
"""
Aggregate child text nodes of an element into a single string.
"""
- text = ''
- if not self._hasChildren(element):
- return element.text
- for child in element:
- if type(child) == etree._Element:
- text += child.text
- return text
+ return '%s' % element.xpath('string(text())')
def _removeStrictEqualsSubNodeList(self, old_list, new_list):
"""Remove inside list all elements which are similar
More information about the Erp5-report
mailing list