summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-03-06 16:39:50 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-03-06 16:39:50 +0000
commit04a95261bb413d3f1f34a5f4b69692af4f9a409c (patch)
treeab63dfeebcc80eb1b0c47dc719afc361b0982a5f /src/lib/Server
parent72400a7d41e06489488beb65d8228944e24c5886 (diff)
downloadbcfg2-04a95261bb413d3f1f34a5f4b69692af4f9a409c.tar.gz
bcfg2-04a95261bb413d3f1f34a5f4b69692af4f9a409c.tar.bz2
bcfg2-04a95261bb413d3f1f34a5f4b69692af4f9a409c.zip
Ohai: Handle case where client returns nothing
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5752 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Plugins/Ohai.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Server/Plugins/Ohai.py b/src/lib/Server/Plugins/Ohai.py
index c18bcbbce..3cd9534c5 100644
--- a/src/lib/Server/Plugins/Ohai.py
+++ b/src/lib/Server/Plugins/Ohai.py
@@ -26,6 +26,9 @@ class OhaiCache(object):
self.cache = dict()
def __setitem__(self, item, value):
+ if value == None:
+ # simply return if the client returned nothing
+ return
self.cache[item] = json.loads(value)
file("%s/%s.json" % (self.dirname, item), 'w').write(value)