summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-08-21 20:49:29 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-08-21 20:49:29 +0000
commitea78a428f3b9c3d1638d1bc1d5aa9955bfdd1b5e (patch)
tree3b74628624b0786ed7a329230be4c8ebcccf310b
parent8e3025197397ffb620a8773821f53171ea5f3be5 (diff)
downloadbcfg2-ea78a428f3b9c3d1638d1bc1d5aa9955bfdd1b5e.tar.gz
bcfg2-ea78a428f3b9c3d1638d1bc1d5aa9955bfdd1b5e.tar.bz2
bcfg2-ea78a428f3b9c3d1638d1bc1d5aa9955bfdd1b5e.zip
Add more error handling on probe paths
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2077 ce84e21b-d406-0410-9b95-82705330c041
-rwxr-xr-xsrc/sbin/bcfg213
1 files changed, 9 insertions, 4 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index b9364cf2f..8cfc7ed37 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -179,14 +179,19 @@ class Client:
# execute probes
try:
- probe_info = [self.run_probe(probe)
- for probe in probes.findall(".//probe")]
+ probedata = Bcfg2.Client.XML.Element("ProbeData")
+ [probedata.append(self.run_probe(probe))
+ for probe in probes.findall(".//probe")]
except:
self.logger.error("Failed to Execute probes")
raise SystemExit, 1
- # upload probe responses
- proxy.RecvProbeData(probe_info)
+ try:
+ # upload probe responses
+ proxy.RecvProbeData(Bcfg2.Client.XML.tostring(probedata))
+ except:
+ self.logger.error("Failed to upload probe data", exc_info=1)
+ raise SystemExit, 1
times['probe_upload'] = time.time()