Skip to content
Snippets Groups Projects
Commit f90b3d83 authored by Erik Johnston's avatar Erik Johnston
Browse files

Add None check to _iterate_over_text

parent f7434713
No related branches found
No related tags found
No related merge requests found
......@@ -449,7 +449,7 @@ def _iterate_over_text(tree, *tags_to_ignore):
el = elements.next()
if isinstance(el, basestring):
yield el
elif el.tag not in tags_to_ignore:
elif el is not None and el.tag not in tags_to_ignore:
# el.text is the text before the first child, so we can immediately
# return it if the text exists.
if el.text:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment