summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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'}