From: Zack Cerza Date: Tue, 11 Jun 2024 23:37:34 +0000 (-0600) Subject: opsys: Tweak OS.__eq__ to work with CentOS Stream X-Git-Tag: 1.2.0~36^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c4be636ae363bf8f8f44389bcd3b548539a1c8b;p=teuthology.git opsys: Tweak OS.__eq__ to work with CentOS Stream Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/opsys.py b/teuthology/orchestra/opsys.py index 133754042..82b468f40 100644 --- a/teuthology/orchestra/opsys.py +++ b/teuthology/orchestra/opsys.py @@ -251,7 +251,7 @@ class OS(object): codename=repr(self.codename)) def __eq__(self, other): - for slot in self.__slots__: - if not getattr(self, slot) == getattr(other, slot): - return False - return True + if self.name.lower() != other.name.lower(): + return False + normalize = lambda s: s.lower().removesuffix(".stream") + return normalize(self.version) == normalize(other.version)