summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Core.py2
-rw-r--r--src/lib/Server/Plugins/DBStats.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index 64a01a2fd..260cc0284 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -2,7 +2,6 @@
__revision__ = '$Revision$'
import atexit
-import copy
import logging
import lxml.etree
import select
@@ -287,7 +286,6 @@ class Core(Component):
def process_statistics(self, client_name, statistics):
meta = self.build_metadata(client_name)
- state = copy.deepcopy(statistics.find(".//Statistics"))
if state.get('version') >= '2.0':
for plugin in self.statistics:
try:
diff --git a/src/lib/Server/Plugins/DBStats.py b/src/lib/Server/Plugins/DBStats.py
index 3b6909eda..4a7e04db2 100644
--- a/src/lib/Server/Plugins/DBStats.py
+++ b/src/lib/Server/Plugins/DBStats.py
@@ -30,8 +30,11 @@ class DBStats(Bcfg2.Server.Plugin.Plugin,
def process_statistics(self, mdata, xdata):
newstats = xdata.find("Statistics")
newstats.set('time', time.asctime(time.localtime()))
+ # ick
+ xdata = lxml.etree.tostring(newstats)
+ ndx = lxml.etree.XML(xdata)
e = lxml.etree.Element('Node', name=mdata.hostname)
- e.append(newstats)
+ e.append(ndx)
container = lxml.etree.Element("ConfigStatistics")
container.append(e)