summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/volume_libs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/volume_libs.py b/glustolibs-gluster/glustolibs/gluster/volume_libs.py
index 0505edfce..376ac5089 100644
--- a/glustolibs-gluster/glustolibs/gluster/volume_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/volume_libs.py
@@ -1686,7 +1686,8 @@ def get_volume_type(brickdir_path):
# Adding import here to avoid cyclic imports
from glustolibs.gluster.brick_libs import get_all_bricks
(host, brick_path_info) = brickdir_path.split(':')
- path_info = brick_path_info[:-1]
+ path_info = (brick_path_info[:-2] if brick_path_info.endswith("//")
+ else brick_path_info[:-1])
for volume in get_volume_list(host):
brick_paths = [brick.split(':')[1] for brick in get_all_bricks(host,
volume)]