]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
opsys: Tweak OS.__eq__ to work with CentOS Stream 1953/head
authorZack Cerza <zack@redhat.com>
Tue, 11 Jun 2024 23:37:34 +0000 (17:37 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 12 Jun 2024 00:12:01 +0000 (18:12 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/orchestra/opsys.py

index 1337540422c82e78b6c8d1527bf3331b3295d70b..82b468f40794639d46036275e54ff7bc31077071 100644 (file)
@@ -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)