From a5f4344ecb9a81cf961a4c04662a2dc7fb0e9029 Mon Sep 17 00:00:00 2001 From: jar3b Date: Sat, 12 Mar 2016 20:22:35 +0300 Subject: [PATCH] Fix manage.py config. Fix warning in xmlparser.py (null check) --- aore/updater/xmlparser.py | 2 +- manage.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/aore/updater/xmlparser.py b/aore/updater/xmlparser.py index a6bddb3..e33bb2f 100644 --- a/aore/updater/xmlparser.py +++ b/aore/updater/xmlparser.py @@ -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 diff --git a/manage.py b/manage.py index 9a2c1f3..f17ef3f 100644 --- a/manage.py +++ b/manage.py @@ -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)