diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-04-15 01:30:40 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-04-15 01:30:40 +0000 |
commit | 93b0d1285dbc7552b4325731f6aa9a9538a7e360 (patch) | |
tree | 6f020585f43e66f8aa23e76c15eb1c8e2ea7c644 /src/lib/Server | |
parent | 1cbb1a3ecee749958d2425a7d2e85a3b002b7a52 (diff) | |
download | bcfg2-93b0d1285dbc7552b4325731f6aa9a9538a7e360.tar.gz bcfg2-93b0d1285dbc7552b4325731f6aa9a9538a7e360.tar.bz2 bcfg2-93b0d1285dbc7552b4325731f6aa9a9538a7e360.zip |
Snapshots: fix Statistics data location in importer
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5166 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r-- | src/lib/Server/Plugins/Snapshots.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/Server/Plugins/Snapshots.py b/src/lib/Server/Plugins/Snapshots.py index e7e7a103b..76da48dac 100644 --- a/src/lib/Server/Plugins/Snapshots.py +++ b/src/lib/Server/Plugins/Snapshots.py @@ -65,9 +65,10 @@ class Snapshots(Bcfg2.Server.Plugin.Statistics, extra = dict([('Package', dict()), ('Service', dict()), ('Path', dict())]) bad = [] - correct = xdata.get('state') == 'clean' - revision = unicode(xdata.get('revision', '-1')) - for entry in xdata.find('.//Bad'): + state = xdata.find('.//Statistics') + correct = state.get('state') == 'clean' + revision = unicode(state.get('revision', '-1')) + for entry in state.find('.//Bad'): data = [False, False, unicode(entry.get('name'))] \ + build_snap_ent(entry) if entry.tag in ftypes: @@ -75,7 +76,7 @@ class Snapshots(Bcfg2.Server.Plugin.Statistics, else: etag = entry.tag entries[etag][entry.get('name')] = data - for entry in xdata.find('.//Modified'): + for entry in state.find('.//Modified'): if entry.tag in ftypes: etag = 'Path' else: @@ -86,7 +87,7 @@ class Snapshots(Bcfg2.Server.Plugin.Statistics, else: data = [True, False, unicode(entry.get('name'))] + \ build_snap_ent(entry) - for entry in xdata.find('.//Extra'): + for entry in state.find('.//Extra'): if entry.tag in datafields: data = build_snap_ent(entry)[1] ename = unicode(entry.get('name')) |