From 2c4be636ae363bf8f8f44389bcd3b548539a1c8b Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 11 Jun 2024 17:37:34 -0600 Subject: [PATCH] opsys: Tweak OS.__eq__ to work with CentOS Stream Signed-off-by: Zack Cerza --- teuthology/orchestra/opsys.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 @@ def __repr__(self): 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)