Skip to content

Commit

Permalink
opsys: Tweak OS.__eq__ to work with CentOS Stream
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
zmc committed Jun 12, 2024
1 parent 8882ef3 commit 2c4be63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions teuthology/orchestra/opsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 2c4be63

Please sign in to comment.