Disable a useless pylint warning

This commit is contained in:
Guillaume Ayoub 2011-05-11 06:37:30 +02:00
parent ce362e1b50
commit 6121bc882a

View File

@ -52,8 +52,11 @@ def _et_indent(element, level=0):
element.tail = i
for sub_element in element:
_et_indent(sub_element, level + 1)
# sub_element is always defined as len(element) > 0
# pylint: disable=W0631
if not sub_element.tail or not sub_element.tail.strip():
sub_element.tail = i
# pylint: enable=W0631
else:
if level and (not element.tail or not element.tail.strip()):
element.tail = i