diff options
author | Jonathan Holloway <jholloway@redhat.com> | 2017-08-07 21:55:58 -0500 |
---|---|---|
committer | Jonathan Holloway <jholloway@redhat.com> | 2017-08-08 01:03:35 -0500 |
commit | 9a1060760da18999f5031732f8bc3d591b41a68e (patch) | |
tree | 5175af2d040b40fd7bb6776b4a1350725998d149 /glustolibs-gluster | |
parent | f7f8b46c6d15a26576db0066efe8a93ab07f0a63 (diff) |
add gluster object exists check to volume config default
gluster_base_class.py: fix error by adding check to ensure gluster entry exists
when no gluster object defined in config file
setup.py: version up to 0.21
Change-Id: I37001673c03a32571b78bbd32489fc1992333d73
Signed-off-by: Jonathan Holloway <jholloway@redhat.com>
Diffstat (limited to 'glustolibs-gluster')
-rw-r--r-- | glustolibs-gluster/glustolibs/gluster/gluster_base_class.py | 7 | ||||
-rw-r--r-- | glustolibs-gluster/setup.py | 2 |
2 files changed, 4 insertions, 5 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 = {} diff --git a/glustolibs-gluster/setup.py b/glustolibs-gluster/setup.py index ad1635924..005571b83 100644 --- a/glustolibs-gluster/setup.py +++ b/glustolibs-gluster/setup.py @@ -19,7 +19,7 @@ from setuptools import setup, find_packages from distutils import dir_util -version = '0.2' +version = '0.21' name = 'glustolibs-gluster' setup( |