summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/brickmux_libs.py
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/brickmux_libs.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/brickmux_libs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/brickmux_libs.py b/glustolibs-gluster/glustolibs/gluster/brickmux_libs.py
index 1206b4682..cb82d8434 100644
--- a/glustolibs-gluster/glustolibs/gluster/brickmux_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/brickmux_libs.py
@@ -66,7 +66,10 @@ def get_all_bricks_from_servers_multivol(servers, servers_info):
for item in list(zip_longest(*list(servers_bricks.values()))):
for brick in item:
- server = server_ip.next()
+ try:
+ server = server_ip.next() # Python 2
+ except AttributeError:
+ server = next(server_ip) # Python 3
if brick:
bricks_list.append(server + ":" + brick)
brickCount += 1