From 613fea98c0547c8a6a0f8347858c3e85bdf4557a Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 12 Oct 2022 14:15:59 -0400 Subject: [PATCH] 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 (cherry picked from commit 7440d7a3c07d3e83ebb2ea7ac9cbbd94762e78ed) --- src/cephadm/cephadm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 0e769043ab6d..47b245869d85 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -230,9 +230,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: -- 2.47.3