From 37155292140a9ad4e19ab87cd026274893df8872 Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Sat, 30 Nov 2019 01:10:19 +0530 Subject: [py2to3] Add py3 support for tests in 'tests/functional/bvt' Change-Id: I8b8aad4c3e4a2ad924478f1842498289323b7098 Signed-off-by: Valerii Ponomarov --- glustolibs-gluster/glustolibs/gluster/gluster_base_class.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'glustolibs-gluster/glustolibs') diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py index 34a1fe581..5a61b86f8 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): -- cgit