]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: fix base class behavior on python3.6
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 12 Oct 2022 18:15:59 +0000 (14:15 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 25 Oct 2022 13:51:39 +0000 (09:51 -0400)
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 <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 8db0b4bea0df2814bacf1180016d2f01063ed0bb..4201de3d9cb3134293feb966ae81cabf02a71121 100755 (executable)
@@ -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: