summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-01-25 03:52:36 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-01-25 03:52:36 +0000
commitf40c9a40effa2706896579a6cc07a2a1448b9335 (patch)
treedfa7e1a79d7fedb1f1366c51ef29404146e5742f /src/lib/Client
parent6e3df77557ca92c2d3db35623fe5315332c8741d (diff)
downloadbcfg2-f40c9a40effa2706896579a6cc07a2a1448b9335.tar.gz
bcfg2-f40c9a40effa2706896579a6cc07a2a1448b9335.tar.bz2
bcfg2-f40c9a40effa2706896579a6cc07a2a1448b9335.zip
Harden handling if __important__ entries (reported by SolJ) [bugfix]
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4289 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Frame.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py
index 92fa3ca7b..a164e9d2e 100644
--- a/src/lib/Client/Frame.py
+++ b/src/lib/Client/Frame.py
@@ -80,10 +80,15 @@ class Frame:
if not self.dryrun:
for cfile in [cfl for cfl in config.findall(".//ConfigFile") \
if cfl.get('name') in self.__important__]:
- tool = [t for t in self.tools if t.handlesEntry(cfile)][0]
- self.states[cfile] = tool.VerifyConfigFile(cfile, [])
- if not self.states[cfile]:
- tool.InstallConfigFile(cfile)
+ tl= [t for t in self.tools if t.handlesEntry(cfile) \
+ and t.canVerify(cfile)]
+ if tl:
+ if not tl[0].VerifyConfigFile(cfile, []):
+ try:
+ self.states[cfile] = tool.InstallConfigFile(cfile)
+ except:
+ self.logger.error("Unexpected tool failure",
+ exc_info=1)
# find entries not handled by any tools
problems = [entry for struct in config for entry in struct if entry not in self.handled]