summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-01-12 19:30:23 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-01-12 19:30:23 +0000
commitf6f6f5a331f9c9419df6cba258eab2f680962307 (patch)
tree3b304e746ecbaf783384a1b0142c51dbe53298f1 /src
parent46527aeb42f7de28a506f544981f753c8d37c163 (diff)
downloadbcfg2-f6f6f5a331f9c9419df6cba258eab2f680962307.tar.gz
bcfg2-f6f6f5a331f9c9419df6cba258eab2f680962307.tar.bz2
bcfg2-f6f6f5a331f9c9419df6cba258eab2f680962307.zip
add modified support
2005/01/12 10:44:14-06:00 anl.gov!desai pylint cleanups (Logical change 1.190) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@809 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Toolset.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index b3f9426a5..0a89fc4a6 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -9,7 +9,7 @@ from stat import S_ISVTX, S_ISGID, S_ISUID, S_IXUSR, S_IWUSR, S_IRUSR, S_IXGRP
from stat import S_IWGRP, S_IRGRP, S_IXOTH, S_IWOTH, S_IROTH, ST_MODE, S_ISDIR
from stat import S_IFREG, ST_UID, ST_GID, S_ISREG, S_IFDIR, S_ISLNK
from sys import exc_info
-from time import asctime, localtime
+#from time import asctime, localtime
from traceback import extract_tb
from elementtree.ElementTree import Element, SubElement, tostring
@@ -107,7 +107,7 @@ class Toolset(object):
# Calculate number of total bundles and structures
total = len(self.states)
- stats.set('total',str(total))
+ stats.set('total', str(total))
# Calculate number of good bundles and structures
good = len([key for key, val in self.states.iteritems() if val])
stats.set('good', str(good))
@@ -126,12 +126,15 @@ class Toolset(object):
# List bad elements of the configuration
if dirty:
bad_elms = SubElement(stats, "Bad")
- for elm in [key for key,val in self.states.iteritems() if not val]:
+ for elm in [key for key, val in self.states.iteritems() if not val]:
if elm.get('name') == None:
SubElement(bad_elms, elm.tag)
else:
SubElement(bad_elms, elm.tag, name=elm.get('name'))
-
+ if self.modified:
+ mod = SubElement(stats, "Modified")
+ for elm in self.modified:
+ SubElement(mod, elm.tag, elm.get('name'))
return stats
# the next two are dispatch functions