summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/brick_libs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/brick_libs.py b/glustolibs-gluster/glustolibs/gluster/brick_libs.py
index 270b378..f840859 100644
--- a/glustolibs-gluster/glustolibs/gluster/brick_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/brick_libs.py
@@ -458,7 +458,11 @@ def get_online_bricks_list(mnode, volname):
bricks_list = get_all_bricks(mnode, volname)
for brick in bricks_list:
brick_node, brick_path = brick.split(":")
- status = int(volume_status[volname][brick_node][brick_path]['status'])
+ try:
+ status = int(volume_status[volname]
+ [brick_node][brick_path]['status'])
+ except KeyError:
+ continue
if status == 1:
online_bricks_list.append(brick)