summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorRick Bradshow <bradshaw@mcs.anl.gov>2006-10-24 17:59:29 +0000
committerRick Bradshow <bradshaw@mcs.anl.gov>2006-10-24 17:59:29 +0000
commit877061150c4c6c2ddb45e05e326be7c3be7db1e9 (patch)
tree557fd3b867b50535d945dd9b642c2a4da500ef9e /src/lib/Server/Plugins
parentb2eaa020171e5d75422ecbce531684ea1f6f1134 (diff)
downloadbcfg2-877061150c4c6c2ddb45e05e326be7c3be7db1e9.tar.gz
bcfg2-877061150c4c6c2ddb45e05e326be7c3be7db1e9.tar.bz2
bcfg2-877061150c4c6c2ddb45e05e326be7c3be7db1e9.zip
updated the way probes store the data properly to close ticket #242
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2454 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/Cfg.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index 850ce016b..354fbd89e 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -215,7 +215,8 @@ class ConfigFileEntry(object):
if self.interpolate:
if metadata.hostname in probeData:
for name, value in probeData[metadata.hostname].iteritems():
- filedata = filedata.replace("@@%s@@"%name, value )
+ if value != None:
+ filedata = filedata.replace("@@%s@@"%name, value )
else:
logger.warning("Cannot interpolate data for client: %s for config file: %s"% (metadata.hostname, basefile.name))
if self.paranoid:
@@ -280,7 +281,10 @@ class Cfg(Bcfg2.Server.Plugin.Plugin):
def ReceiveData(self, client, data):
'''Receive probe results pertaining to client'''
- probeData[client.hostname] = { data.get('name'):data.text }
+ try:
+ probeData[client.hostname].update({ data.get('name'):data.text })
+ except KeyError:
+ probeData[client.hostname] = { data.get('name'):data.text }
def AddDirectoryMonitor(self, name):
'''Add new directory to FAM structures'''