summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
index ee7a23f3c..3dd8f976f 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
@@ -206,10 +206,9 @@ class GlusterBaseClass(unittest.TestCase):
# Default volume options which is applicable for all the volumes
cls.volume_options = {}
- if ('volume_options' in g.config['gluster'] and
- g.config['gluster']['volume_options']):
- cls.volume_options = (
- g.config['gluster']['volume_options'])
+ if (g.config.get('gluster') and
+ g.config['gluster'].get('volume_options')):
+ cls.volume_options = g.config['gluster']['volume_options']
# Get the volume configuration.
cls.volume = {}