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

View File

@ -7,6 +7,13 @@ from aore.miscutils.sphinx import SphinxHelper
from aore.updater.soapreceiver import SoapReceiver
from aore.updater.updater import Updater
# Load config
try:
from config import *
except ImportError:
assert "No config"
# Initialize logging
logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO)