summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-10-05 20:28:04 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-10-05 20:28:04 +0000
commitb485a7acb6ccb3e1575b6cb1701d3bbf7a1e218d (patch)
tree96509d35d3b1f342e06083514f3b7596eb978ec4
parentcaa14901b8b2628fcf33a8051aa5a53c1e5211a0 (diff)
downloadbcfg2-b485a7acb6ccb3e1575b6cb1701d3bbf7a1e218d.tar.gz
bcfg2-b485a7acb6ccb3e1575b6cb1701d3bbf7a1e218d.tar.bz2
bcfg2-b485a7acb6ccb3e1575b6cb1701d3bbf7a1e218d.zip
fix Commit call
(Logical change 1.73) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@364 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/sbin/bcfg213
1 files changed, 10 insertions, 3 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 132898ca7..6dbb169ef 100644
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -124,15 +124,22 @@ class ClientState(object):
modlist = [x.attrib['name'] for x in structure.getchildren() if x.tag == 'ConfigFile']
for entry in structure.getchildren():
self.VerifyEntry(entry, modlist)
- state = map(lambda x:self.states[x], structure.getchildren())
- if False not in state:
- self.structures[structure] = True
+ try:
+ state = map(lambda x:self.states[x], structure.getchildren())
+ if False not in state:
+ self.structures[structure] = True
+ except KeyError, k:
+ print "State verify evidently failed for %s"%(k)
+ self.structures[structure] = False
def Install(self):
self.modified = [k for (k,v) in self.structures.iteritems() if not v]
for entry in [k for (k,v) in self.states.iteritems() if not v]:
self.InstallEntry(entry)
+ def Commit(self):
+ self.toolset.Commit()
+
if __name__ == '__main__':
# parse command line options
options = {'v':'verbose','q':'quick', 'd':'debug', 'n':'dryrun', 'B':'build', 'p':'paranoid'}