summaryrefslogtreecommitdiffstats
path: root/plugins/config_generator.py
diff options
context:
space:
mode:
authorRamesh Nachimuthu <rnachimu@redhat.com>2014-04-28 21:04:39 +0530
committerSahina Bose <sabose@redhat.com>2014-04-30 07:19:11 -0700
commit73abc9e9734654e47b01bb46ab75b5e2b13d14b4 (patch)
tree9cfba521adca814658f8ff43bca975d48205597d /plugins/config_generator.py
parente34b8338759a56a3f0c03156aaa5b94377c679ed (diff)
autoconf: fix for empty services in hosts.
There were some key errors when there is no service in the hosts. It fixed by using dict.get(). Change-Id: Ic479f5335240c772a520e4ee0e7b41ce85f905e5 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7594 Reviewed-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins/config_generator.py')
-rw-r--r--plugins/config_generator.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/config_generator.py b/plugins/config_generator.py
index 7e36ae0..e7d35fd 100644
--- a/plugins/config_generator.py
+++ b/plugins/config_generator.py
@@ -294,7 +294,7 @@ class GlusterNagiosConfManager:
hostModel.set_filename(self.getCfgFileName(host['host_name']))
hostModel.save()
- if host['host_services']:
+ if host.get('host_services'):
self.writeHostServices(host)
def writeHosts(self, hosts, chageMode):