Fix manage.py config. Fix warning in xmlparser.py (null check)

This commit is contained in:
jar3b
2016-03-12 20:22:35 +03:00
parent ad70ef7742
commit a5f4344ecb
2 changed files with 8 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ class XMLParser:
elem.clear()
# Also eliminate now-empty references from the root node to elem
for ancestor in elem.xpath('ancestor-or-self::*'):
while ancestor.getprevious():
while ancestor.getprevious() is not None:
del ancestor.getparent()[0]
del context