summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-16 09:37:33 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-16 09:37:33 -0400
commit999f692e1fad2e64c316f31ac9d642bc5231b4d4 (patch)
tree878398598acb129a7f98fe00bc06dd2542220b1e
parentff0fbc90abce96f3ed9b00f785ee9d2055794ae3 (diff)
downloadbcfg2-999f692e1fad2e64c316f31ac9d642bc5231b4d4.tar.gz
bcfg2-999f692e1fad2e64c316f31ac9d642bc5231b4d4.tar.bz2
bcfg2-999f692e1fad2e64c316f31ac9d642bc5231b4d4.zip
strip whitespace from one more XML parse
-rw-r--r--src/lib/Server/Plugin.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index c9de0d89b..d51a13804 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -13,8 +13,6 @@ import threading
import Bcfg2.Server
from Bcfg2.Bcfg2Py3k import ConfigParser
-from lxml.etree import XML, XMLSyntaxError
-
import Bcfg2.Options
# py3k compatibility
@@ -574,8 +572,9 @@ class XMLFileBacked(FileBacked):
def Index(self):
"""Build local data structures."""
try:
- self.xdata = XML(self.data)
- except XMLSyntaxError:
+ self.xdata = lxml.etree.XML(self.data,
+ parser=Bcfg2.Server.XMLParser)
+ except lxml.etree.XMLSyntaxError:
logger.error("Failed to parse %s" % (self.name))
return
self.entries = self.xdata.getchildren()