summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-11-05 05:23:34 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-11-05 05:23:34 +0000
commitbe9e4f5e2740d7d33496bb39bbac5c4415682fd7 (patch)
tree039a57a6b5a7ea0c1bde35f90b890d4e7b98d663 /src/lib
parentd553c8faf0621a80acbccbf84331aed7a2437ae3 (diff)
downloadbcfg2-be9e4f5e2740d7d33496bb39bbac5c4415682fd7.tar.gz
bcfg2-be9e4f5e2740d7d33496bb39bbac5c4415682fd7.tar.bz2
bcfg2-be9e4f5e2740d7d33496bb39bbac5c4415682fd7.zip
DBStats: Fix data eating / Core: revert copy change
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5530 ce84e21b-d406-0410-9b95-82705330c041
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)