From: John Mulligan Date: Wed, 12 Oct 2022 18:15:59 +0000 (-0400) Subject: cephadm: fix base class behavior on python3.6 X-Git-Tag: v18.1.0~955^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7440d7a3c07d3e83ebb2ea7ac9cbbd94762e78ed;p=ceph-ci.git cephadm: fix base class behavior on python3.6 This fixes the cephadm test files when running tox/pytest on python3.6 (centos/rhel 8). Long story short, combining classmethod and property on py3.6 behaves differently from py3.7 and up. Since the classmethod is actually unnecessary for the base class to behave as it does, we drop that decorator. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 8db0b4bea0d..4201de3d9cb 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -233,9 +233,8 @@ class ContainerEngine: def __init__(self) -> None: self.path = find_program(self.EXE) - @classmethod @property - def EXE(cls) -> str: + def EXE(self) -> str: raise NotImplementedError() def __str__(self) -> str: