summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-11-30 01:10:19 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-12-09 17:59:35 +0000
commit37155292140a9ad4e19ab87cd026274893df8872 (patch)
treefe0185224e48d962e854117ab3f6c8d4b22148ee /glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
parentcabfc95648ebb76cf7ad409cc594b3f8a131f109 (diff)
[py2to3] Add py3 support for tests in 'tests/functional/bvt'
Change-Id: I8b8aad4c3e4a2ad924478f1842498289323b7098 Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/gluster_base_class.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
index 34a1fe5..5a61b86 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
@@ -117,12 +117,10 @@ class GlusterBaseClass(TestCase):
"""
current_type = obj if isclass(obj) else obj.__class__
- if (getattr(super(current_type, obj), method_name) != getattr(
- obj, method_name)):
- return getattr(super(current_type, obj), method_name)
- # NOTE(vponomar): we always have here just one base as 'obj' is
- # expected to be renamed copy of it's parent.
- return getattr(super(current_type.__bases__[0], obj), method_name)
+ while getattr(super(current_type, obj), method_name) == getattr(
+ obj, method_name):
+ current_type = current_type.__base__
+ return getattr(super(current_type, obj), method_name)
@classmethod
def inject_msg_in_gluster_logs(cls, msg):