mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-24 03:41:12 +00:00
Make hint comparison more intelligent
"easy foo/1 bar/2" and "easy bar/2 foo/1" are simply different ways of writing the same hint, so the corresponding Hint objects should compare as equal. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
parent
16984f345c
commit
a799ce3df1
7
hints.py
7
hints.py
@ -77,7 +77,12 @@ class Hint(object):
|
||||
return self._hint
|
||||
|
||||
def __eq__(self, other):
|
||||
return str(self) == str(other)
|
||||
if self.type != other.type:
|
||||
return False
|
||||
elif self.type == 'age-days' and self.days != other.days:
|
||||
return False
|
||||
else:
|
||||
return frozenset(self.packages) == frozenset(other.packages)
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user