summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Pellin <bpellin@mcs.anl.gov>2005-01-11 20:53:54 +0000
committerBrian Pellin <bpellin@mcs.anl.gov>2005-01-11 20:53:54 +0000
commitc5bf4fa7fbeb062719c688dbd9eda550c6c906b1 (patch)
tree305aaaee768c410f3479216439cf58ed94c38351 /src
parenteb0a770611020ceb5734e363098023ae5107f3e6 (diff)
downloadbcfg2-c5bf4fa7fbeb062719c688dbd9eda550c6c906b1.tar.gz
bcfg2-c5bf4fa7fbeb062719c688dbd9eda550c6c906b1.tar.bz2
bcfg2-c5bf4fa7fbeb062719c688dbd9eda550c6c906b1.zip
Only counts states for statistics purposes.
(Logical change 1.187) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@799 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Toolset.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index 1e2286704..41bcd783d 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -106,11 +106,10 @@ class Toolset(object):
stats = Element("Statistics")
# Calculate number of total bundles and structures
- total = len(self.structures) + len(self.states)
+ total = len(self.states)
stats.set('total',str(total))
# Calculate number of good bundles and structures
- good = len([key for key, val in self.structures.iteritems() if val]) + \
- len([key for key, val in self.states.iteritems() if val])
+ good = len([key for key, val in self.states.iteritems() if val])
stats.set('good', str(good))
stats.set('version', '2.0')
stats.set('client_version', client_version)
@@ -129,11 +128,6 @@ class Toolset(object):
SubElement(bad_elms, elm.tag)
else:
SubElement(bad_elms, elm.tag, name=elm.get('name'))
- for elm in [key for key,val in self.structures.iteritems() if not val]:
- if elm.get('name') == None:
- SubElement(bad_elms, elm.tag)
- else:
- SubElement(bad_elms, elm.tag, name=elm.get('name'))
return stats