diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-08-23 15:48:55 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-08-23 15:48:55 +0000 |
commit | c2c00913b110ef6e21d40c6f5eead0f7a5a827b0 (patch) | |
tree | 8468d5137c444737336c520658cc77af640c8913 /src | |
parent | a583f510eb0a96401b1b391f9cdcd748e19fd2d9 (diff) | |
download | bcfg2-c2c00913b110ef6e21d40c6f5eead0f7a5a827b0.tar.gz bcfg2-c2c00913b110ef6e21d40c6f5eead0f7a5a827b0.tar.bz2 bcfg2-c2c00913b110ef6e21d40c6f5eead0f7a5a827b0.zip |
Only upload probe responses if probes were executed (works around bug in old server versions)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2095 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rwxr-xr-x | src/sbin/bcfg2 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2 index aa8b0b8a3..909a8360a 100755 --- a/src/sbin/bcfg2 +++ b/src/sbin/bcfg2 @@ -188,12 +188,13 @@ class Client: self.logger.error("Failed to Execute probes") raise SystemExit, 1 - 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 + if len(probes.findall(".//probe")) > 0: + 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() |