summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs/openshiftstoragelibs/gluster_ops.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-05 23:50:48 +0530
committervponomar <vponomar@redhat.com>2019-12-11 12:27:00 +0000
commit0cd073fdd42ed19186719862ed78006738d89f3e (patch)
tree079b8a740d4146c58cb59e83c5a66bc86168d606 /openshift-storage-libs/openshiftstoragelibs/gluster_ops.py
parente3d38114d334fa99f574a37ee8b5af7f60291be7 (diff)
[py2to3] Fix various py3 incompatibilities
Change-Id: I6c517278c3f8bf6f374ab60bc27768e503161278
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/gluster_ops.py')
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/gluster_ops.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/gluster_ops.py b/openshift-storage-libs/openshiftstoragelibs/gluster_ops.py
index 33ffa18d..b80c587d 100644
--- a/openshift-storage-libs/openshiftstoragelibs/gluster_ops.py
+++ b/openshift-storage-libs/openshiftstoragelibs/gluster_ops.py
@@ -229,12 +229,12 @@ def match_heketi_and_gluster_block_volumes_by_prefix(
if block_vol.startswith(block_vol_prefix)
])
- if cmp(sorted(gluster_vol_block_list), heketi_block_volumes) != 0:
+ vol_difference = set(gluster_vol_block_list) ^ set(heketi_block_volumes)
+ if vol_difference:
err_msg = "Gluster and Heketi Block volume list match failed"
err_msg += "\nGluster Volumes: %s, " % gluster_vol_block_list
err_msg += "\nBlock volumes %s" % heketi_block_volumes
- err_msg += "\nDifference: %s" % (
- set(gluster_vol_block_list) ^ set(heketi_block_volumes))
+ err_msg += "\nDifference: %s" % vol_difference
raise AssertionError(err_msg)