aarddict/tools — Issue #13: Avoid python warning
Author: Snaptags
Created: 2011-12-17 16:41:29+00:00
State: open

Maybe line 356 in mwaardhtmlwriter.py should be changed like this:

if (element.tag.lower() not in ("br", "td", "img", "hr", "col", "colgroup") and
not (element.getchildren() or (element.text == types.NoneType) or (element.tail == types.NoneType)) and parent):
parent.remove(element)

It prevents python 2.7.2+ from displaying thousands of warnings like "The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead"